code: def test_cudf_factorize_series():
      data = [1, 2, 3, 4, 5]
  
      psr = pd.Series(data)
      gsr = cudf.Series(data)
  
      expect = pd.factorize(psr)
      got = cudf.factorize(gsr)
  
      assert len(expect) == len(got)
  
      np.testing.assert_array_equal(expect[0], got[0].get())
      np.testing.assert_array_equal(expect[1], got[1].values.get())
  
file_path: cudf/python/cudf/cudf/tests/test_factorize.py
imports: import cupy
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf import DataFrame, Index
  from cudf.testing._utils import assert_eq
label_desc: Use image node_id 4 for calling a global function with example usage: test_cudf_factorize_series() without return types