code: def test_periodindex(using_copy_on_write, box):
      dt = period_range("2019-12-31", periods=3, freq="D")
      ser = Series(dt)
      idx = box(PeriodIndex(ser))
      expected = idx.copy(deep=True)
      ser.iloc[0] = Period("2020-12-31")
      if using_copy_on_write:
          tm.assert_index_equal(idx, expected)
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_periodindex(using_copy_on_write, box) without return types