code: def test_astype_uint(self):
      arr = period_range("2000", periods=2, name="idx")
  
      with pytest.raises(TypeError, match=r"Do obj.astype\('int64'\)"):
          arr.astype("uint64")
      with pytest.raises(TypeError, match=r"Do obj.astype\('int64'\)"):
          arr.astype("uint32")
  
file_path: pandas/pandas/tests/indexes/period/methods/test_astype.py
imports: import numpy
  import pytest
  from pandas import CategoricalIndex, DatetimeIndex, Index, NaT, Period, PeriodIndex, period_range
  import pandas._testing
label_desc: Use image node_id 3 for calling the TestPeriodIndexAsType obj's underlying member method code with example usage: obj.test_astype_uint() without return types