code: def test_set_index(nelem, divisions):
      with dask.config.set(scheduler="single-threaded"):
          np.random.seed(0)
          # Use unique index range as the sort may not be stable-ordering
          x = np.arange(nelem)
          np.random.shuffle(x)
          df = pd.DataFrame(
              {"x": x, "y": np.random.randint(0, nelem, size=nelem)}
          )
          ddf = dd.from_pandas(df, npartitions=2)
          dgdf = ddf.map_partitions(cudf.from_pandas)
  
          expect = ddf.set_index("x")
          got = dgdf.set_index("x", divisions=divisions)
  
          dd.assert_eq(
              expect, got, check_index=False, check_divisions=False
          )
  
imports: import random
  import cupy
  import numpy
  import pandas
  import pytest
  from packaging import version
  import dask
  from dask import dataframe
  from dask.dataframe.core import make_meta, meta_nonempty
  from dask.utils import M
  import cudf
  import dask_cudf
label_desc: Use image node_id 12 for calling a global function with example usage: test_set_index(nelem, divisions) without return types