code: def test_unique_labels(setup):
      # Empty iterable
      with pytest.raises(ValueError):
          unique_labels()
  
      # Multiclass problem
      assert_array_equal(unique_labels(range(10)), np.arange(10))
      assert_array_equal(unique_labels(np.arange(10)), np.arange(10))
      assert_array_equal(unique_labels([4, 0, 2]), np.array([0, 2, 4]))
  
      # Multilabel indicator
      assert_array_equal(
          unique_labels(np.array([[0, 0, 1], [1, 0, 1], [0, 0, 0]])),
          np.arange(3),
      )
  
      assert_array_equal(
          unique_labels(np.array([[0, 0, 1], [0, 0, 0]])), np.arange(3)
      )
  
      # Several arrays passed
      assert_array_equal(
          unique_labels([4, 0, 2], range(5)), np.arange(5)
      )
      assert_array_equal(
          unique_labels((0, 1, 2), (0,), (2, 1)), np.arange(3)
      )
  
      # Border line case with binary indicator matrix
      with pytest.raises(ValueError):
          unique_labels([4, 0, 2], np.ones((5, 5))).execute()
      with pytest.raises(ValueError):
          unique_labels(np.ones((5, 4)), np.ones((5, 5))).execute()
  
      assert_array_equal(
          unique_labels(np.ones((4, 5)), np.ones((5, 5))), np.arange(5)
      )
  
file_path: mars/mars/learn/utils/tests/test_multiclass.py
imports: from itertools import product
  import numpy
  import pytest
  import scipy.sparse
  from scipy.sparse import csr_matrix
  from sklearn.utils._testing import assert_array_equal
  from sklearn.utils.estimator_checks import _NotAnArray
  from sklearn.utils.multiclass import is_multilabel, type_of_target
  from ....None import tensor
  from ..multiclass import is_multilabel, unique_labels, type_of_target
label_desc: Use image node_id 1 for calling a global function with example usage: test_unique_labels(setup) without return types