code: def test_agg_cython_table_raises_frame(
      df, func, expected, axis, using_infer_string
  ):
      # GH 21224
      if using_infer_string:
          import pyarrow as pa
  
          expected = (expected, pa.lib.ArrowNotImplementedError)
  
      msg = "can't multiply sequence by non-int of type 'str'|has no kernel"
      warn = None if isinstance(func, str) else FutureWarning
      with pytest.raises(expected, match=msg):
          with tm.assert_produces_warning(
              warn, match="using DataFrame.cumprod"
          ):
              df.agg(func, axis=axis)
  
imports: from itertools import chain
  import re
  import numpy
  import pytest
  from pandas.errors import SpecificationError
  from pandas import DataFrame, Series, date_range
  import pandas._testing
label_desc: Use image node_id 15 for calling a global function with example usage: test_agg_cython_table_raises_frame(df, func, expected, axis, using_infer_string) without return types