code: def test_add_overflow_raises(self):
      # GH#55503
      per = Timestamp.max.to_period("ns")
  
      msg = "|".join(
          [
              "Python int too large to convert to C long",
              # windows, 32bit linux builds
              "int too big to convert",
          ]
      )
      with pytest.raises(OverflowError, match=msg):
          per + 1
  
      msg = "value too large"
      with pytest.raises(OverflowError, match=msg):
          per + Timedelta(1)
      with pytest.raises(OverflowError, match=msg):
          per + offsets.Nano(1)
  
imports: from datetime import timedelta
  import numpy
  import pytest
  from pandas._libs.tslibs.period import IncompatibleFrequency
  from pandas import NaT, Period, Timedelta, Timestamp, offsets
label_desc: Use image node_id 1 for calling the TestPeriodArithmetic obj's underlying member method code with example usage: obj.test_add_overflow_raises() without return types