class_docstr: A distributed Dask DataFrame where the backing dataframe is a
  :class:`cuDF DataFrame <cudf:cudf.DataFrame>`.
  
  Typically you would not construct this object directly, but rather
  use one of Dask-cuDF's IO routines.
  
  Most operations on :doc:`Dask DataFrames <dask:dataframe>` are
  supported, with many of the same caveats.
class_docstr_tok: ["A","distributed","Dask","DataFrame","where","the","backing","dataframe","is","a",":","class",":","`","cuDF","DataFrame","<","cudf",":","cudf.DataFrame",">","`",".","Typically","you","would","not","construct","this","object","directly",",","but","rather","use","one","of","Dask-cuDF","'s","IO","routines",".","Most","operations","on",":","doc",":","`","Dask","DataFrames","<","dask",":","dataframe",">","`","are","supported",",","with","many","of","the","same","caveats","."]
code: def set_index(
      self,
      other,
      sorted=False,
      divisions=None,
      shuffle_method=None,
      **kwargs,
  ):
      pre_sorted = sorted
      del sorted
  
      if (
          divisions == "quantile"
          or isinstance(divisions, (cudf.DataFrame, cudf.Series))
          or (
              isinstance(other, str)
              and cudf.api.types.is_string_dtype(self[other].dtype)
          )
      ):
          # Let upstream-dask handle "pre-sorted" case
          if pre_sorted:
              return dd.shuffle.set_sorted_index(
                  self, other, divisions=divisions, **kwargs
              )
  
          by = other
          if not isinstance(other, list):
              by = [by]
          if len(by) > 1:
              raise ValueError(
                  "Dask does not support MultiIndex (yet)."
              )
          if divisions == "quantile":
              divisions = None
  
          # Use dask_cudf's sort_values
          df = self.sort_values(
              by,
              max_branch=kwargs.get("max_branch", None),
              divisions=divisions,
              set_divisions=True,
              ignore_index=True,
              shuffle_method=shuffle_method,
          )
  
          # Ignore divisions if its a dataframe
          if isinstance(divisions, cudf.DataFrame):
              divisions = None
  
          # Set index and repartition
          df2 = df.map_partitions(
              sorting.set_index_post,
              index_name=other,
              drop=kwargs.get("drop", True),
              column_dtype=df.columns.dtype,
          )
          npartitions = kwargs.get("npartitions", self.npartitions)
          partition_size = kwargs.get("partition_size", None)
          if partition_size:
              return df2.repartition(partition_size=partition_size)
          if not divisions and df2.npartitions != npartitions:
              return df2.repartition(npartitions=npartitions)
          if divisions and df2.npartitions != len(divisions) - 1:
              return df2.repartition(divisions=divisions)
          return df2
  
      return super().set_index(
          other,
          sorted=pre_sorted,
          shuffle_method=_get_shuffle_method(shuffle_method),
          divisions=divisions,
          **kwargs,
      )
  
imports: import math
  import textwrap
  import warnings
  import numpy
  import pandas
  from tlz import partition_all
  from dask import dataframe
  from dask.base import normalize_token, tokenize
  from dask.dataframe.core import Scalar, handle_out, make_meta, map_partitions
  from dask.dataframe.utils import raise_on_meta_error
  from dask.highlevelgraph import HighLevelGraph
  from dask.utils import M, OperatorMethodMixin, apply, derived_from, funcname
  import cudf
  from cudf import _lib
  from cudf.utils.nvtx_annotation import _dask_cudf_nvtx_annotate
  from dask_cudf import sorting
  from dask_cudf.accessors import ListMethods, StructMethods
  from dask_cudf.sorting import _deprecate_shuffle_kwarg, _get_shuffle_method
label_desc: Use image node_id 5 for calling the DataFrame obj's underlying member method code with example usage: obj.set_index(other, sorted, divisions, shuffle_method) and returns: super, df2, dd, df2, df2, df2