code: def test_period_index():
      # test 1285
  
      dates = pd.period_range(start="1/1/1990", periods=20, freq="M")
      x = np.arange(1, 21.0)
  
      model = TimeSeriesModel(pd.Series(x, index=dates))
      assert_equal(model._index.freqstr, "M")
      model = TimeSeriesModel(pd.Series(x, index=dates))
      npt.assert_(model.data.freq == "M")
  
file_path: statsmodels/statsmodels/tsa/base/tests/test_base.py
imports: from statsmodels.compat.pandas import PD_LT_2_2_0
  from datetime import datetime
  import numpy
  import numpy.testing
  import pandas
  import pytest
  from statsmodels.tools.sm_exceptions import ValueWarning
  from statsmodels.tools.testing import assert_equal
  from statsmodels.tsa.base.tsa_model import TimeSeriesModel
label_desc: Use image node_id 4 for calling a global function with example usage: test_period_index() without return types