code: def test_complex_indexing_error(setup_path):
      complex128 = np.array(
          [1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j, 1.0 + 1.0j],
          dtype=np.complex128,
      )
      df = DataFrame(
          {
              "A": [1, 2, 3, 4],
              "B": ["a", "b", "c", "d"],
              "C": complex128,
          },
          index=list("abcd"),
      )
  
      msg = (
          "Columns containing complex values can be stored "
          "but cannot be indexed when using table format. "
          "Either use fixed format, set index=False, "
          "or do not include the columns containing complex "
          "values to data_columns when initializing the table."
      )
  
      with ensure_clean_store(setup_path) as store:
          with pytest.raises(TypeError, match=msg):
              store.append("df", df, data_columns=["C"])
  
file_path: pandas/pandas/tests/io/pytables/test_complex.py
imports: import numpy
  import pytest
  import pandas
  from pandas import DataFrame, Series
  import pandas._testing
  from pandas.tests.io.pytables.common import ensure_clean_store
  from pandas.io.pytables import read_hdf
label_desc: Use image node_id 7 for calling a global function with example usage: test_complex_indexing_error(setup_path) without return types