code: def test_category_dtype_factorize(data):
      gs = cudf.Series(data, dtype="category")
      ps = gs.to_pandas()
  
      actual_codes, actual_uniques = gs.factorize()
      expected_codes, expected_uniques = ps.factorize()
  
      assert_eq(actual_codes, expected_codes)
      assert_eq(actual_uniques, expected_uniques)
  
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 9 for calling a global function with example usage: test_category_dtype_factorize(data) without return types