code: def test_period_range_fractional_period(self):
      msg = "Non-integer 'periods' in pd.date_range, pd.timedelta_range"
      with tm.assert_produces_warning(FutureWarning, match=msg):
          result = period_range("2007-01", periods=10.5, freq="M")
      exp = period_range("2007-01", periods=10, freq="M")
      tm.assert_index_equal(result, exp)
  
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 11 for calling the TestPeriodIndex obj's underlying member method code with example usage: obj.test_period_range_fractional_period() without return types