code: def test_constructor_year_and_quarter(self):
      year = Series([2001, 2002, 2003])
      quarter = year - 2000
      msg = "Constructing PeriodIndex from fields is deprecated"
      with tm.assert_produces_warning(FutureWarning, match=msg):
          idx = PeriodIndex(year=year, quarter=quarter)
      strs = [f"{t[0]:d}Q{t[1]:d}" for t in zip(quarter, year)]
      lops = list(map(Period, strs))
      p = PeriodIndex(lops)
      tm.assert_index_equal(p, idx)
  
imports: import numpy
  import pytest
  from pandas._libs.tslibs.period import IncompatibleFrequency
  from pandas.core.dtypes.dtypes import PeriodDtype
  from pandas import Index, NaT, Period, PeriodIndex, Series, date_range, offsets, period_range
  import pandas._testing
  from pandas.core.arrays import PeriodArray
label_desc: Use image node_id 22 for calling the TestPeriodIndex obj's underlying member method code with example usage: obj.test_constructor_year_and_quarter() without return types