class_docstr: Data in the buffer is guaranteed to be contiguous in memory.
class_docstr_tok: ["Data","in","the","buffer","is","guaranteed","to","be","contiguous","in","memory","."]
code: def __dlpack__(self):
      # DLPack not implemented in NumPy yet, so leave it out here.
      try:
          cuda_array = as_cuda_array(self._buf).view(self._dtype)
          return cp.asarray(cuda_array).toDlpack()
      except ValueError:
          raise TypeError(
              f"dtype {self._dtype} unsupported by `dlpack`"
          )
  
imports: import enum
  from collections import abc
  from typing import Any, Dict, Iterable, Mapping, Optional, Sequence, Tuple, cast
  import cupy
  import numpy
  from numba.cuda import as_cuda_array
  import rmm
  import cudf
  from cudf.core.buffer import Buffer, as_buffer
  from cudf.core.column import as_column, build_categorical_column, build_column
label_desc: Use image node_id 4 for calling the _CuDFBuffer obj's underlying member method code with example usage: obj.__dlpack__() and returns: cp