code: def check_ptr(a, b, input_type):
      if input_type == "cudf":
          for (_, col_a), (_, col_b) in zip(
              a._data.items(), b._data.items()
          ):
              with cudf.core.buffer.acquire_spill_lock():
                  assert col_a.base_data.get_ptr(
                      mode="read"
                  ) == col_b.base_data.get_ptr(mode="read")
      else:
  
          def get_ptr(x):
              try:
                  return x.__cuda_array_interface__["data"][0]
              except AttributeError:
                  return x.__array_interface__["data"][0]
  
          if input_type == "pandas":
              a = a.values
              b = b.values
  
          assert get_ptr(a) == get_ptr(b)
  
imports: from pandas import Series
  from cuml.internals.safe_imports import cpu_only_import_from
  from cuml.internals.safe_imports import gpu_only_import_from
  from cuml.internals.input_utils import convert_dtype
  from cuml.common import has_cupy
  from cuml.internals.input_utils import input_to_cupy_array
  from cuml.common import input_to_host_array
  from cuml.common import input_to_cuml_array, CumlArray
  from cuml.internals.safe_imports import cpu_only_import
  import pytest
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 11 for calling a global function with example usage: check_ptr(a, b, input_type) and returns: x, x