code: def test_overflow_timestamp_raises(self):
      # https://github.com/pandas-dev/pandas/issues/31774
      msg = "Result is too large"
      a = Timestamp("2101-01-01 00:00:00").as_unit("ns")
      b = Timestamp("1688-01-01 00:00:00").as_unit("ns")
  
      with pytest.raises(OutOfBoundsDatetime, match=msg):
          a - b
  
      # but we're OK for timestamp and datetime.datetime
      assert (a - b.to_pydatetime()) == (a.to_pydatetime() - b)
  
imports: from datetime import datetime, timedelta, timezone
  from dateutil.tz import gettz
  import numpy
  import pytest
  import pytz
  from pandas._libs.tslibs import OutOfBoundsDatetime, OutOfBoundsTimedelta, Timedelta, Timestamp, offsets, to_offset
  import pandas._testing
label_desc: Use image node_id 3 for calling the TestTimestampArithmetic obj's underlying member method code with example usage: obj.test_overflow_timestamp_raises() without return types