code: def test_timedelta_from_typecast(data, dtype, cast_dtype):
      if dtype not in ("timedelta64[ns]"):
          pytest.skip(
              "Bug in pandas : https://github.com/pandas-dev/pandas/issues/35465"
          )
      psr = pd.Series(
          cp.asnumpy(data) if isinstance(data, cp.ndarray) else data,
          dtype=dtype,
      )
      gsr = cudf.Series(data, dtype=dtype)
  
      if cast_dtype == "int64":
          assert_eq(
              psr.values.view(cast_dtype), gsr.astype(cast_dtype).values
          )
      else:
          assert_eq(psr.astype(cast_dtype), gsr.astype(cast_dtype))
  
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 2 for calling a global function with example usage: test_timedelta_from_typecast(data, dtype, cast_dtype) without return types