code: def test_struct_with_datetime_and_timedelta(dtype):
      df = cudf.DataFrame(
          {
              "a": [12, 232, 2334],
              "datetime": cudf.Series(
                  [23432, 3432423, 324324], dtype=dtype
              ),
          }
      )
      series = df.to_struct()
      a_array = np.array([12, 232, 2334])
      datetime_array = np.array([23432, 3432423, 324324]).astype(dtype)
  
      actual = series.to_pandas()
      values_list = []
      for i, val in enumerate(a_array):
          values_list.append({"a": val, "datetime": datetime_array[i]})
  
      expected = pd.Series(values_list)
      assert_eq(expected, actual)
  
imports: import numpy
  import pandas
  import pyarrow
  import pytest
  import cudf
  from cudf.core.dtypes import StructDtype
  from cudf.testing._utils import DATETIME_TYPES, TIMEDELTA_TYPES, assert_eq
label_desc: Use image node_id 17 for calling a global function with example usage: test_struct_with_datetime_and_timedelta(dtype) without return types