code: def test_put_string_index(setup_path):
      with ensure_clean_store(setup_path) as store:
          index = Index(
              [f"I am a very long string index: {i}" for i in range(20)]
          )
          s = Series(np.arange(20), index=index)
          df = DataFrame({"A": s, "B": s})
  
          store["a"] = s
          tm.assert_series_equal(store["a"], s)
  
          store["b"] = df
          tm.assert_frame_equal(store["b"], df)
  
          # mixed length
          index = Index(
              ["abcdefghijklmnopqrstuvwxyz1234567890"]
              + [
                  f"I am a very long string index: {i}"
                  for i in range(20)
              ]
          )
          s = Series(np.arange(21), index=index)
          df = DataFrame({"A": s, "B": s})
          store["a"] = s
          tm.assert_series_equal(store["a"], s)
  
          store["b"] = df
          tm.assert_frame_equal(store["b"], df)
  
file_path: pandas/pandas/tests/io/pytables/test_put.py
imports: import re
  import numpy
  import pytest
  from pandas._libs.tslibs import Timestamp
  import pandas
  from pandas import DataFrame, HDFStore, Index, MultiIndex, Series, _testing, concat, date_range
  from pandas.tests.io.pytables.common import _maybe_remove, ensure_clean_store
  from pandas.util import _test_decorators
label_desc: Use image node_id 5 for calling a global function with example usage: test_put_string_index(setup_path) without return types