code: def test_constructor_invalid_quarters(self):
      depr_msg = "Constructing PeriodIndex from fields is deprecated"
      msg = "Quarter must be 1 <= q <= 4"
      with pytest.raises(ValueError, match=msg):
          with tm.assert_produces_warning(
              FutureWarning, match=depr_msg
          ):
              PeriodIndex(
                  year=range(2000, 2004),
                  quarter=list(range(4)),
                  freq="Q-DEC",
              )
  
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 10 for calling the TestPeriodIndex obj's underlying member method code with example usage: obj.test_constructor_invalid_quarters() without return types