code: def test_add_period_to_array_of_offset(self):
      # GH#50162
      per = pd.Period("2012-1-1", freq="D")
      pi = pd.period_range("2012-1-1", periods=10, freq="D")
      idx = per - pi
  
      expected = pd.Index([x + per for x in idx], dtype=object)
      result = idx + per
      tm.assert_index_equal(result, expected)
  
      result = per + idx
      tm.assert_index_equal(result, expected)
  
imports: import datetime
  from decimal import Decimal
  import operator
  import numpy
  import pytest
  from pandas._config import using_pyarrow_string_dtype
  import pandas.util._test_decorators
  import pandas
  from pandas import Series, Timestamp, option_context
  import pandas._testing
  from pandas.core import ops
label_desc: Use image node_id 1 for calling the TestArithmetic obj's underlying member method code with example usage: obj.test_add_period_to_array_of_offset() without return types