code: def test_labelencoder_unseen():
      """Try encoding a value that was not present during fitting"""
      df = cudf.Series(np.random.choice(10, (10,)))
      le = LabelEncoder().fit(df)
      assert le._fitted
  
      with pytest.raises(KeyError):
          le.transform(cudf.Series([-1]))
  
file_path: cuml/python/cuml/tests/test_label_encoder.py
imports: from cuml.common.exceptions import NotFittedError
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.preprocessing.LabelEncoder import LabelEncoder
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 4 for calling a global function with example usage: test_labelencoder_unseen() without return types