code: def test_unimplemented_dtypes_table_columns(setup_path):
      with ensure_clean_store(setup_path) as store:
          dtypes = [("date", datetime.date(2001, 1, 2))]
  
          # currently not supported dtypes ####
          for n, f in dtypes:
              df = DataFrame(
                  1.1 * np.arange(120).reshape((30, 4)),
                  columns=Index(list("ABCD"), dtype=object),
                  index=Index(
                      [f"i-{i}" for i in range(30)], dtype=object
                  ),
              )
              df[n] = f
              msg = re.escape(
                  f"[{n}] is not implemented as a table column"
              )
              with pytest.raises(TypeError, match=msg):
                  store.append(f"df1_{n}", df)
  
      # frame
      df = DataFrame(
          1.1 * np.arange(120).reshape((30, 4)),
          columns=Index(list("ABCD"), dtype=object),
          index=Index([f"i-{i}" for i in range(30)], dtype=object),
      )
      df["obj1"] = "foo"
      df["obj2"] = "bar"
      df["datetime1"] = datetime.date(2001, 1, 2)
      df = df._consolidate()
  
      with ensure_clean_store(setup_path) as store:
          # this fails because we have a date in the object block......
          msg = re.escape(
              """Cannot serialize the column [datetime1]
  because its data contents are not [string] but [date] object dtype"""
          )
          with pytest.raises(TypeError, match=msg):
              store.append("df_unimplemented", df)
  
file_path: pandas/pandas/tests/io/pytables/test_errors.py
imports: import datetime
  from io import BytesIO
  import re
  import numpy
  import pytest
  from pandas import CategoricalIndex, DataFrame, HDFStore, Index, MultiIndex, _testing, date_range, read_hdf
  from pandas.tests.io.pytables.common import ensure_clean_store
  from pandas.io.pytables import Term, _maybe_adjust_name
label_desc: Use image node_id 3 for calling a global function with example usage: test_unimplemented_dtypes_table_columns(setup_path) without return types