class_docstr: The cuDFInterface allows a Dataset objects to wrap a cuDF
  DataFrame object. Using cuDF allows working with columnar
  data on a GPU. Most operations leave the data in GPU memory,
  however to plot the data it has to be loaded into memory.
  
  The cuDFInterface covers almost the complete API exposed
  by the PandasInterface with two notable exceptions:
  
  1) Aggregation and groupby do not have a consistent sort order
     (see https://github.com/rapidsai/cudf/issues/4237)
  3) Not all functions can be easily applied to a cuDF so
     some functions applied with aggregate and reduce will not work.
class_docstr_tok: ["The","cuDFInterface","allows","a","Dataset","objects","to","wrap","a","cuDF","DataFrame","object",".","Using","cuDF","allows","working","with","columnar","data","on","a","GPU",".","Most","operations","leave","the","data","in","GPU","memory",",","however","to","plot","the","data","it","has","to","be","loaded","into","memory",".","The","cuDFInterface","covers","almost","the","complete","API","exposed","by","the","PandasInterface","with","two","notable","exceptions",":","1",")","Aggregation","and","groupby","do","not","have","a","consistent","sort","order","(","see","https",":","\/\/github.com\/rapidsai\/cudf\/issues\/4237",")","3",")","Not","all","functions","can","be","easily","applied","to","a","cuDF","so","some","functions","applied","with","aggregate","and","reduce","will","not","work","."]
code: def init(cls, eltype, data, kdims, vdims):
      import cudf
  
      element_params = eltype.param.objects()
      kdim_param = element_params["kdims"]
      vdim_param = element_params["vdims"]
  
      if isinstance(data, (cudf.Series, pd.Series)):
          data = data.to_frame()
  
      if not isinstance(data, cudf.DataFrame):
          data, _, _ = PandasInterface.init(eltype, data, kdims, vdims)
          data = cudf.from_pandas(data)
  
      columns = list(data.columns)
      ncols = len(columns)
      index_names = [data.index.name]
      if index_names == [None]:
          index_names = ["index"]
      if eltype._auto_indexable_1d and ncols == 1 and kdims is None:
          kdims = list(index_names)
  
      if isinstance(kdim_param.bounds[1], int):
          ndim = min([kdim_param.bounds[1], len(kdim_param.default)])
      else:
          ndim = None
      nvdim = (
          vdim_param.bounds[1]
          if isinstance(vdim_param.bounds[1], int)
          else None
      )
      if kdims and vdims is None:
          vdims = [c for c in columns if c not in kdims]
      elif vdims and kdims is None:
          kdims = [c for c in columns if c not in vdims][:ndim]
      elif kdims is None:
          kdims = list(columns[:ndim])
          if vdims is None:
              vdims = [
                  d
                  for d in columns[
                      ndim : ((ndim + nvdim) if nvdim else None)
                  ]
                  if d not in kdims
              ]
      elif kdims == [] and vdims is None:
          vdims = list(columns[: nvdim if nvdim else None])
  
      # Handle reset of index if kdims reference index by name
      for kd in kdims:
          kd = dimension_name(kd)
          if kd in columns:
              continue
          if any(
              kd == ("index" if name is None else name)
              for name in index_names
          ):
              data = data.reset_index()
              break
      if any(isinstance(d, (np.int64, int)) for d in kdims + vdims):
          raise DataError(
              "cudf DataFrame column names used as dimensions "
              "must be strings not integers.",
              cls,
          )
  
      if kdims:
          kdim = dimension_name(kdims[0])
          if (
              eltype._auto_indexable_1d
              and ncols == 1
              and kdim not in columns
          ):
              data = data.copy()
              data.insert(0, kdim, np.arange(len(data)))
  
      for d in kdims + vdims:
          d = dimension_name(d)
          if len([c for c in columns if c == d]) > 1:
              raise DataError(
                  "Dimensions may not reference duplicated DataFrame "
                  "columns (found duplicate %r columns). If you want to plot "
                  "a column against itself simply declare two dimensions "
                  "with the same name. " % d,
                  cls,
              )
      return data, {"kdims": kdims, "vdims": vdims}, {}
  
imports: import sys
  import warnings
  from itertools import product
  import numpy
  import pandas
  from ..None import util
  from ..dimension import dimension_name
  from ..element import Element
  from ..ndmapping import NdMapping, item_check, sorted_context
  from .interface import DataError, Interface
  from .pandas import PandasInterface
  from .util import finite_range
label_desc: Use image node_id 3 for calling the cuDFInterface obj's underlying member method code with example usage: obj.init(cls, eltype, data, kdims, vdims) and returns: data,  dict,  dict