code: def test_timedelta_datetime_cast_invalid():
      sr = cudf.Series([1, 2, 3], dtype="timedelta64[ns]")
      psr = sr.to_pandas()
  
      assert_exceptions_equal(
          psr.astype,
          sr.astype,
          (["datetime64[ns]"],),
          (["datetime64[ns]"],),
      )
  
      sr = cudf.Series([1, 2, 3], dtype="datetime64[ns]")
      psr = sr.to_pandas()
  
      assert_exceptions_equal(
          psr.astype,
          sr.astype,
          (["timedelta64[ns]"],),
          (["timedelta64[ns]"],),
      )
  
imports: import datetime
  import operator
  import cupy
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf.testing import _utils
  from cudf.testing._utils import assert_eq, assert_exceptions_equal
label_desc: Use image node_id 26 for calling a global function with example usage: test_timedelta_datetime_cast_invalid() without return types