code: def test_delta_to_nanoseconds_error():
      obj = np.array([123456789], dtype="m8[ns]")
  
      with pytest.raises(TypeError, match="<class 'numpy.ndarray'>"):
          delta_to_nanoseconds(obj)
  
      with pytest.raises(TypeError, match="float"):
          delta_to_nanoseconds(1.5)
      with pytest.raises(TypeError, match="int"):
          delta_to_nanoseconds(1)
      with pytest.raises(TypeError, match="int"):
          delta_to_nanoseconds(np.int64(2))
      with pytest.raises(TypeError, match="int"):
          delta_to_nanoseconds(np.int32(3))
  
file_path: pandas/pandas/tests/tslibs/test_timedeltas.py
imports: import re
  import numpy
  import pytest
  from pandas._libs.tslibs.timedeltas import array_to_timedelta64, delta_to_nanoseconds, ints_to_pytimedelta
  from pandas import Timedelta, offsets
  import pandas._testing
label_desc: Use image node_id 2 for calling a global function with example usage: test_delta_to_nanoseconds_error() without return types