code: def test_invalid_index_types_unicode():
      # see gh-10822
      #
      # Odd error message on conversions to datetime for unicode.
      msg = "Unknown datetime string format"
  
      with pytest.raises(ValueError, match=msg):
          frequencies.infer_freq(Index(["ZqgszYBfuL"]))
  
imports: from datetime import datetime, timedelta
  import numpy
  import pytest
  from pandas._libs.tslibs.ccalendar import DAYS, MONTHS
  from pandas._libs.tslibs.offsets import _get_offset
  from pandas._libs.tslibs.period import INVALID_FREQ_ERR_MSG
  from pandas.compat import is_platform_windows
  from pandas import DatetimeIndex, Index, RangeIndex, Series, Timestamp, date_range, period_range
  import pandas._testing
  from pandas.core.arrays import DatetimeArray, TimedeltaArray
  from pandas.core.tools.datetimes import to_datetime
  from pandas.tseries import frequencies, offsets
label_desc: Use image node_id 25 for calling a global function with example usage: test_invalid_index_types_unicode() without return types