code: def test_series_agg_multi_pure_python():
      data = DataFrame(
          {
              "A": [
                  "foo",
                  "foo",
                  "foo",
                  "foo",
                  "bar",
                  "bar",
                  "bar",
                  "bar",
                  "foo",
                  "foo",
                  "foo",
              ],
              "B": [
                  "one",
                  "one",
                  "one",
                  "two",
                  "one",
                  "one",
                  "one",
                  "two",
                  "two",
                  "two",
                  "one",
              ],
              "C": [
                  "dull",
                  "dull",
                  "shiny",
                  "dull",
                  "dull",
                  "shiny",
                  "shiny",
                  "dull",
                  "shiny",
                  "shiny",
                  "shiny",
              ],
              "D": np.random.default_rng(2).standard_normal(11),
              "E": np.random.default_rng(2).standard_normal(11),
              "F": np.random.default_rng(2).standard_normal(11),
          }
      )
  
      def bad(x):
          assert len(x.values.base) > 0
          return "foo"
  
      result = data.groupby(["A", "B"]).agg(bad)
      expected = data.groupby(["A", "B"]).agg(lambda x: "foo")
      tm.assert_frame_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 13 for calling a global function with example usage: test_series_agg_multi_pure_python() and returns: str