code: def test_set_index_2(nelem):
      with dask.config.set(scheduler="single-threaded"):
          np.random.seed(0)
          df = pd.DataFrame(
              {
                  "x": 100
                  + np.random.randint(0, nelem // 2, size=nelem),
                  "y": np.random.normal(size=nelem),
              }
          )
          expect = df.set_index("x").sort_index()
  
          dgf = dd.from_pandas(
              cudf.DataFrame.from_pandas(df), npartitions=4
          )
          res = dgf.set_index("x")  # sort by default
          got = res.compute().to_pandas()
  
          assert_frame_equal_by_index_group(expect, got)
  
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 15 for calling a global function with example usage: test_set_index_2(nelem) without return types