code: def test_transform_wont_agg_frame(axis, float_frame, func):
      # GH 35964
      # cannot both transform and agg
      msg = "Function did not transform"
      with pytest.raises(ValueError, match=msg):
          float_frame.transform(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 22 for calling a global function with example usage: test_transform_wont_agg_frame(axis, float_frame, func) without return types