code: def test_set_index():
      df = cudf.DataFrame({"x": [1, 2, 3], "y": [4, 5, 6]})
  
      a = DataFrame(example=df)
  
      b = a.set_index("x").stream.sink_to_list()
      a.emit(df)
      assert_eq(b[0], df.set_index("x"))
  
      b = a.set_index(a.y + 1).stream.sink_to_list()
      a.emit(df)
      assert_eq(b[0], df.set_index(df.y + 1))
  
imports: import json
  import operator
  import numpy
  import pandas
  import pytest
  from dask.dataframe.utils import assert_eq
  from distributed import Client
  from streamz import Stream
  from streamz.dask import DaskStream
  from streamz.dataframe import Aggregation, DataFrame, DataFrames, Series
label_desc: Use image node_id 11 for calling a global function with example usage: test_set_index() without return types