code: def test_get_loc_naive_dti_aware_str_deprecated(self):
      # GH#46903
      ts = Timestamp("20130101")._value
      dti = pd.DatetimeIndex([ts + 50 + i for i in range(100)])
      ser = Series(range(100), index=dti)
  
      key = "2013-01-01 00:00:00.000000050+0000"
      msg = re.escape(repr(key))
      with pytest.raises(KeyError, match=msg):
          ser[key]
  
      with pytest.raises(KeyError, match=msg):
          dti.get_loc(key)
  
file_path: pandas/pandas/tests/indexing/test_datetime.py
imports: import re
  import pytest
  import pandas
  from pandas import DataFrame, Index, Series, Timestamp, date_range
  import pandas._testing
label_desc: Use image node_id 1 for calling the TestDatetimeIndex obj's underlying member method code with example usage: obj.test_get_loc_naive_dti_aware_str_deprecated() without return types