code: def test_dataframe_expanding_agg(setup):
      raw = pd.DataFrame(
          {
              "a": np.random.randint(100, size=(10,)),
              "b": np.random.rand(10),
              "c": np.random.randint(100, size=(10,)),
              "d": ["c" * i for i in np.random.randint(4, size=10)],
          }
      )
      raw.b[:3] = np.nan
      raw.b[5:7] = np.nan
  
      df = md.DataFrame(raw, chunk_size=(10, 3))
  
      r = df.expanding().agg(["sum"])
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.expanding().agg(["sum"])
      )
  
      df = md.DataFrame(raw, chunk_size=(3, 2))
  
      aggs = ["sum", "count", "min", "max", "mean", "var", "std"]
  
      for fun_name in aggs:
          r = df.expanding().agg(fun_name)
          pd.testing.assert_frame_equal(
              r.execute().fetch(), raw.expanding().agg(fun_name)
          )
  
      r = df.expanding().agg(["sum"])
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.expanding().agg(["sum"])
      )
  
      r = df.expanding().agg(aggs)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.expanding().agg(aggs)
      )
  
      agg_dict = {"c": "sum"}
      r = df.expanding().agg(agg_dict)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.expanding().agg(agg_dict)
      )
  
      agg_dict = OrderedDict([("a", ["sum", "var"]), ("b", "var")])
      r = df.expanding().agg(agg_dict)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.expanding().agg(agg_dict)
      )
  
      r = df.expanding(0).agg(aggs)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.expanding(0).agg(aggs)
      )
  
      r = df.expanding(2).agg(aggs)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.expanding(2).agg(aggs)
      )
  
      agg_dict = OrderedDict(
          [("a", ["min", "max"]), ("b", "max"), ("c", "sum")]
      )
      r = df.expanding(2).agg(agg_dict)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.expanding(2).agg(agg_dict)
      )
  
imports: from collections import OrderedDict
  import numpy
  import pandas
  from .....None import dataframe
label_desc: Use image node_id 1 for calling a global function with example usage: test_dataframe_expanding_agg(setup) without return types