code: def test_to_period_quarterly(self, month):
      # make sure we can make the round trip
      freq = f"Q-{month}"
      rng = period_range("1989Q3", "1991Q3", freq=freq)
      stamps = rng.to_timestamp()
      result = stamps.to_period(freq)
      tm.assert_index_equal(rng, result)
  
imports: import dateutil.tz
  from dateutil.tz import tzlocal
  import pytest
  import pytz
  from pandas._libs.tslibs.ccalendar import MONTHS
  from pandas._libs.tslibs.offsets import MonthEnd
  from pandas._libs.tslibs.period import INVALID_FREQ_ERR_MSG
  from pandas import DatetimeIndex, Period, PeriodIndex, Timestamp, date_range, period_range
  import pandas._testing
label_desc: Use image node_id 2 for calling the TestToPeriod obj's underlying member method code with example usage: obj.test_to_period_quarterly(month) without return types