code: def test_label_encoder(setup, values, classes, unknown):
      # Test LabelEncoder's transform, fit_transform and
      # inverse_transform methods
      values_t = mt.tensor(values)
  
      le = LabelEncoder()
      le.fit(values_t)
      assert_array_equal(le.classes_.fetch(), classes)
      assert_array_equal(
          le.transform(values_t).fetch(), [1, 0, 2, 0, 2]
      )
      assert_array_equal(
          le.inverse_transform(mt.tensor([1, 0, 2, 0, 2])).fetch(),
          values,
      )
  
      le = LabelEncoder()
      ret = le.fit_transform(values)
      assert_array_equal(ret.fetch(), [1, 0, 2, 0, 2])
  
      with pytest.raises(ValueError, match="unseen labels"):
          le.transform(unknown)
  
imports: import numpy
  import pytest
  import scipy.sparse
  from sklearn.preprocessing._label import _inverse_binarize_thresholding
  from sklearn.preprocessing._label import _inverse_binarize_multiclass
  from sklearn.utils._testing import assert_array_equal, ignore_warnings
  from sklearn.utils.multiclass import type_of_target
  from ....None import tensor
  from ..None import LabelBinarizer, label_binarize, LabelEncoder
label_desc: Use image node_id 11 for calling a global function with example usage: test_label_encoder(setup, values, classes, unknown) without return types