code: def test_apply_dict_depr():
      tsdf = DataFrame(
          np.random.default_rng(2).standard_normal((10, 3)),
          columns=["A", "B", "C"],
          index=date_range("1/1/2000", periods=10),
      )
      msg = "nested renamer is not supported"
      with pytest.raises(SpecificationError, match=msg):
          tsdf.A.agg({"foo": ["sum", "mean"]})
  
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 8 for calling a global function with example usage: test_apply_dict_depr() without return types