code: def test_ensure_timedelta64ns_overflows():
      arr = np.arange(10).astype("m8[Y]") * 100
      msg = r"Cannot convert 300 years to timedelta64\[ns\] without overflow"
      with pytest.raises(OutOfBoundsTimedelta, match=msg):
          astype_overflowsafe(arr, dtype=np.dtype("m8[ns]"))
  
file_path: pandas/pandas/tests/tslibs/test_conversion.py
imports: from datetime import datetime
  import numpy
  import pytest
  from pytz import UTC
  from pandas._libs.tslibs import OutOfBoundsTimedelta, astype_overflowsafe, conversion, iNaT, timezones, tz_convert_from_utc, tzconversion
  from pandas import Timestamp, date_range
  import pandas._testing
label_desc: Use image node_id 10 for calling a global function with example usage: test_ensure_timedelta64ns_overflows() without return types