code: def test_series_expanding_agg(setup):
      raw = pd.Series(np.random.rand(10), name="a")
      raw[:3] = np.nan
      raw[5:10:2] = np.nan
  
      series = md.Series(raw, chunk_size=10)
  
      r = series.ewm(alpha=0.3).agg(["mean"])
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.ewm(alpha=0.3).agg(["mean"])
      )
  
      r = series.ewm(alpha=0.3).agg("mean")
      pd.testing.assert_series_equal(
          r.execute().fetch(), raw.ewm(alpha=0.3).agg("mean")
      )
  
      series = md.Series(raw, chunk_size=3)
  
      aggs = ["mean", "var", "std"]
  
      for fun_name in aggs:
          r = series.ewm(alpha=0.3).agg(fun_name)
          pd.testing.assert_series_equal(
              r.execute().fetch(), raw.ewm(alpha=0.3).agg(fun_name)
          )
  
          r = series.ewm(alpha=0.3, ignore_na=True).agg(fun_name)
          pd.testing.assert_series_equal(
              r.execute().fetch(),
              raw.ewm(alpha=0.3, ignore_na=True).agg(fun_name),
          )
  
      r = series.ewm(alpha=0.3).agg(["mean"])
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.ewm(alpha=0.3).agg(["mean"])
      )
  
      r = series.ewm(alpha=0.3).agg(aggs)
      pd.testing.assert_frame_equal(
          r.execute().fetch(), raw.ewm(alpha=0.3).agg(aggs)
      )
  
      r = series.ewm(alpha=0.3, min_periods=0).agg(aggs)
      pd.testing.assert_frame_equal(
          r.execute().fetch(),
          raw.ewm(alpha=0.3, min_periods=0).agg(aggs),
      )
  
      r = series.ewm(alpha=0.3, min_periods=2).agg(aggs)
      pd.testing.assert_frame_equal(
          r.execute().fetch(),
          raw.ewm(alpha=0.3, min_periods=2).agg(aggs),
      )
  
imports: from collections import OrderedDict
  import numpy
  import pandas
  from .....None import dataframe
label_desc: Use image node_id 2 for calling a global function with example usage: test_series_expanding_agg(setup) without return types