code: def test_index(data, search_key, expect):
      sr = cudf.Series(data)
      expect = cudf.Series(expect, dtype="int32")
      if is_scalar(search_key):
          got = sr.list.index(
              cudf.Scalar(search_key, sr.dtype.element_type)
          )
      else:
          got = sr.list.index(
              cudf.Series(search_key, dtype=sr.dtype.element_type)
          )
  
      assert_eq(expect, got)
  
imports: import functools
  import operator
  import numpy
  import pandas
  import pyarrow
  import pytest
  import cudf
  from cudf import NA
  from cudf._lib.copying import get_element
  from cudf.api.types import is_scalar
  from cudf.testing._utils import DATETIME_TYPES, NUMERIC_TYPES, TIMEDELTA_TYPES, assert_eq
label_desc: Use image node_id 24 for calling a global function with example usage: test_index(data, search_key, expect) without return types