code: def test_labelencoder_fit_transform(length, cardinality):
      """Try encoding the entire df"""
      df = cudf.Series(np.random.choice(cardinality, (length,)))
      encoded = LabelEncoder().fit_transform(df)
  
      df_arr = _df_to_similarity_mat(df)
      encoded_arr = _df_to_similarity_mat(encoded)
      assert (
          (encoded_arr == encoded_arr.T) == (df_arr == df_arr.T)
      ).all()
  
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 2 for calling a global function with example usage: test_labelencoder_fit_transform(length, cardinality) without return types