code: def test_indexing_with_datetimeindex_tz(self, indexer_sl):
      # GH 12050
      # indexing on a series with a datetimeindex with tz
      index = date_range("2015-01-01", periods=2, tz="utc")
  
      ser = Series(range(2), index=index, dtype="int64")
  
      # list-like indexing
  
      for sel in (index, list(index)):
          # getitem
          result = indexer_sl(ser)[sel]
          expected = ser.copy()
          if sel is not index:
              expected.index = expected.index._with_freq(None)
          tm.assert_series_equal(result, expected)
  
          # setitem
          result = ser.copy()
          indexer_sl(result)[sel] = 1
          expected = Series(1, index=index)
          tm.assert_series_equal(result, expected)
  
      # single element indexing
  
      # getitem
      assert indexer_sl(ser)[index[1]] == 1
  
      # setitem
      result = ser.copy()
      indexer_sl(result)[index[1]] = 5
      expected = Series([0, 5], index=index)
      tm.assert_series_equal(result, expected)
  
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 5 for calling the TestDatetimeIndex obj's underlying member method code with example usage: obj.test_indexing_with_datetimeindex_tz(indexer_sl) without return types