code: def test_set_index_sorted():
      with dask.config.set(scheduler="single-threaded"):
          df1 = pd.DataFrame(
              {"val": [4, 3, 2, 1, 0], "id": [0, 1, 3, 5, 7]}
          )
          ddf1 = dd.from_pandas(df1, npartitions=2)
  
          gdf1 = cudf.from_pandas(df1)
          gddf1 = dgd.from_cudf(gdf1, npartitions=2)
  
          expect = ddf1.set_index("id", sorted=True)
          got = gddf1.set_index("id", sorted=True)
  
          dd.assert_eq(expect, got)
  
          with pytest.raises(ValueError):
              # Cannot set `sorted=True` for non-sorted column
              gddf1.set_index("val", sorted=True)
  
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 17 for calling a global function with example usage: test_set_index_sorted() without return types