code: def test_tseries_select_index_column(setup_path):
      # GH7777
      # selecting a UTC datetimeindex column did
      # not preserve UTC tzinfo set before storing
  
      # check that no tz still works
      rng = date_range("1/1/2000", "1/30/2000")
      frame = DataFrame(
          np.random.default_rng(2).standard_normal((len(rng), 4)),
          index=rng,
      )
  
      with ensure_clean_store(setup_path) as store:
          store.append("frame", frame)
          result = store.select_column("frame", "index")
          assert rng.tz == DatetimeIndex(result.values).tz
  
      # check utc
      rng = date_range("1/1/2000", "1/30/2000", tz="UTC")
      frame = DataFrame(
          np.random.default_rng(2).standard_normal((len(rng), 4)),
          index=rng,
      )
  
      with ensure_clean_store(setup_path) as store:
          store.append("frame", frame)
          result = store.select_column("frame", "index")
          assert rng.tz == result.dt.tz
  
      # double check non-utc
      rng = date_range("1/1/2000", "1/30/2000", tz="US/Eastern")
      frame = DataFrame(
          np.random.default_rng(2).standard_normal((len(rng), 4)),
          index=rng,
      )
  
      with ensure_clean_store(setup_path) as store:
          store.append("frame", frame)
          result = store.select_column("frame", "index")
          assert rng.tz == result.dt.tz
  
imports: from datetime import date, timedelta
  import numpy
  import pytest
  from pandas._libs.tslibs.timezones import maybe_get_tz
  import pandas.util._test_decorators
  import pandas
  from pandas import DataFrame, DatetimeIndex, Series, Timestamp, date_range
  import pandas._testing
  from pandas.tests.io.pytables.common import _maybe_remove, ensure_clean_store
label_desc: Use image node_id 6 for calling a global function with example usage: test_tseries_select_index_column(setup_path) without return types