code: def test_factorize_result_classes():
      data = [1, 2, 3]
  
      labels, cats = cudf.factorize(cudf.Series(data))
  
      assert isinstance(labels, cp.ndarray)
      assert isinstance(cats, cudf.BaseIndex)
  
      labels, cats = cudf.factorize(cudf.Index(data))
  
      assert isinstance(labels, cp.ndarray)
      assert isinstance(cats, cudf.BaseIndex)
  
      labels, cats = cudf.factorize(cp.array(data))
  
      assert isinstance(labels, cp.ndarray)
      assert isinstance(cats, cp.ndarray)
  
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 8 for calling a global function with example usage: test_factorize_result_classes() without return types