code: def test_label_encoder_encode_to_correct_shape():
      encoder = encoders.LabelEncoder(["a", "b"])
      dataset = tf.data.Dataset.from_tensor_slices(
          [["a"], ["b"]]
      ).batch(32)
  
      result = encoder.transform(dataset)
  
      assert data_utils.dataset_shape(result).as_list() == [None, 1]
  
file_path: autokeras/autokeras/preprocessors/encoders_test.py
imports: import numpy
  import tensorflow
  from autokeras import preprocessors
  from autokeras.preprocessors import encoders
  from autokeras.utils import data_utils
label_desc: Use image node_id 4 for calling a global function with example usage: test_label_encoder_encode_to_correct_shape() without return types