code: def test_image_dataset_from_directory_manual_labels(self):
      # Case: wrong number of labels
      directory = self._prepare_directory(num_classes=1, count=4)
      with self.assertRaisesRegex(
          ValueError, "match the number of files"
      ):
          image_dataset_utils.image_dataset_from_directory(
              directory,
              batch_size=8,
              image_size=(18, 18),
              labels=[0, 1, 0],
              shuffle=False,
          )
  
      # Case: single directory
      directory = self._prepare_directory(num_classes=1, count=4)
      dataset = image_dataset_utils.image_dataset_from_directory(
          directory,
          batch_size=8,
          image_size=(18, 18),
          labels=[0, 1, 0, 1],
          shuffle=False,
      )
      if backend.config.image_data_format() == "channels_last":
          output_shape = [18, 18, 3]
      else:
          output_shape = [3, 18, 18]
      self.assertEqual(dataset.class_names, ["0", "1"])
      batch = next(iter(dataset))
      self.assertLen(batch, 2)
      self.assertEqual(batch[0].shape, [4] + output_shape)
      self.assertAllClose(batch[1], [0, 1, 0, 1])
  
      # Case: multiple directories
      directory = self._prepare_directory(num_classes=3, count=6)
      dataset = image_dataset_utils.image_dataset_from_directory(
          directory,
          batch_size=8,
          image_size=(18, 18),
          labels=[0, 1, 0, 1, 1, 1],
          shuffle=False,
      )
      self.assertEqual(dataset.class_names, ["0", "1"])
      batch = next(iter(dataset))
      self.assertLen(batch, 2)
      self.assertEqual(batch[0].shape, [6] + output_shape)
      self.assertAllClose(batch[1], [0, 1, 0, 1, 1, 1])
  
imports: import os
  import numpy
  from keras import backend
  from keras import testing
  from keras.utils import image_dataset_utils
  from keras.utils import image_utils
  from keras.utils.module_utils import tensorflow
label_desc: Use image node_id 10 for calling the ImageDatasetFromDirectoryTest obj's underlying member method code with example usage: obj.test_image_dataset_from_directory_manual_labels() without return types