code: def test_series_agg_multikey():
      ts = Series(
          np.arange(10, dtype=np.float64),
          index=date_range("2020-01-01", periods=10),
      )
      grouped = ts.groupby([lambda x: x.year, lambda x: x.month])
  
      result = grouped.agg("sum")
      expected = grouped.sum()
      tm.assert_series_equal(result, expected)
  
imports: import datetime
  from functools import partial
  import numpy
  import pytest
  from pandas.errors import SpecificationError
  import pandas
  from pandas import DataFrame, Index, MultiIndex, PeriodIndex, Series, date_range, period_range
  import pandas._testing
  from pandas.io.formats.printing import pprint_thing
label_desc: Use image node_id 12 for calling a global function with example usage: test_series_agg_multikey() without return types