code: def test_constructor_simple_new(self):
      idx = period_range("2007-01", name="p", periods=2, freq="M")
  
      with pytest.raises(
          AssertionError, match="<class .*PeriodIndex'>"
      ):
          idx._simple_new(idx, name="p")
  
      result = idx._simple_new(idx._data, name="p")
      tm.assert_index_equal(result, idx)
  
      msg = "Should be numpy array of type i8"
      with pytest.raises(AssertionError, match=msg):
          # Need ndarray, not int64 Index
          type(idx._data)._simple_new(Index(idx.asi8), dtype=idx.dtype)
  
      arr = type(idx._data)._simple_new(idx.asi8, dtype=idx.dtype)
      result = idx._simple_new(arr, name="p")
      tm.assert_index_equal(result, 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 1 for calling the TestSimpleNew obj's underlying member method code with example usage: obj.test_constructor_simple_new() without return types