code: def test_to_dlpack_cupy_2d(data_2d):
      expectation = data_size_expectation_builder(data_2d)
  
      with expectation:
          gdf = cudf.DataFrame.from_records(data_2d)
          cudf_host_array = np.array(gdf.to_pandas()).flatten()
          dlt = gdf.to_dlpack()
  
          cupy_array = cupy_from_dlpack(dlt)
          cupy_host_array = cupy_array.get().flatten()
  
          assert_eq(cudf_host_array, cupy_host_array)
  
imports: import itertools
  from contextlib import ExitStack
  import cupy
  import numpy
  import pytest
  from packaging import version
  import cudf
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 9 for calling a global function with example usage: test_to_dlpack_cupy_2d(data_2d) without return types