code: def test_pandas_parquet_datetime_tz():
      # Pandas v2 defaults to [ns], but Arrow defaults to [us] time units
      # so we need to cast the pandas dtype. Pandas v1 will always silently
      # coerce to [ns] due to lack of non-[ns] support.
      s = pd.Series(
          [datetime.datetime(2017, 9, 6)], dtype="datetime64[us]"
      )
      s = s.dt.tz_localize("utc")
      s.index = s
  
      # Both a column and an index to hit both use cases
      df = pd.DataFrame(
          {"tz_aware": s, "tz_eastern": s.dt.tz_convert("US/Eastern")},
          index=s,
      )
  
      f = io.BytesIO()
  
      arrow_table = pa.Table.from_pandas(df)
  
      _write_table(arrow_table, f)
      f.seek(0)
  
      table_read = pq.read_pandas(f)
  
      df_read = table_read.to_pandas()
      tm.assert_frame_equal(df, df_read)
  
file_path: arrow/python/pyarrow/tests/parquet/test_datetime.py
imports: import datetime
  import io
  import warnings
  import numpy
  import pytest
  import pyarrow
  from pyarrow.tests.parquet.common import _check_roundtrip
label_desc: Use image node_id 1 for calling a global function with example usage: test_pandas_parquet_datetime_tz() without return types