code: def test_invalid_complib(setup_path):
      df = DataFrame(
          np.random.default_rng(2).random((4, 5)),
          index=list("abcd"),
          columns=list("ABCDE"),
      )
      with tm.ensure_clean(setup_path) as path:
          msg = r"complib only supports \[.*\] compression."
          with pytest.raises(ValueError, match=msg):
              df.to_hdf(path, key="df", complib="foolib")
  
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 6 for calling a global function with example usage: test_invalid_complib(setup_path) without return types