code: def test_image_dataset_from_directory_validation_split(self):
      directory = self._prepare_directory(num_classes=2, count=10)
      dataset = image_dataset_utils.image_dataset_from_directory(
          directory,
          batch_size=10,
          image_size=(18, 18),
          validation_split=0.2,
          subset="training",
          seed=1337,
      )
      batch = next(iter(dataset))
      self.assertLen(batch, 2)
      if backend.config.image_data_format() == "channels_last":
          train_output_shape = [8, 18, 18, 3]
          val_output_shape = [2, 18, 18, 3]
      else:
          train_output_shape = [8, 3, 18, 18]
          val_output_shape = [2, 3, 18, 18]
      self.assertEqual(batch[0].shape, train_output_shape)
      dataset = image_dataset_utils.image_dataset_from_directory(
          directory,
          batch_size=10,
          image_size=(18, 18),
          validation_split=0.2,
          subset="validation",
          seed=1337,
      )
      batch = next(iter(dataset))
      self.assertLen(batch, 2)
      self.assertEqual(batch[0].shape, val_output_shape)
  
      (
          train_dataset,
          val_dataset,
      ) = image_dataset_utils.image_dataset_from_directory(
          directory,
          batch_size=10,
          image_size=(18, 18),
          validation_split=0.2,
          subset="both",
          seed=1337,
      )
      batch = next(iter(train_dataset))
      self.assertLen(batch, 2)
      self.assertEqual(batch[0].shape, train_output_shape)
      batch = next(iter(val_dataset))
      self.assertLen(batch, 2)
      self.assertEqual(batch[0].shape, val_output_shape)
  
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 9 for calling the ImageDatasetFromDirectoryTest obj's underlying member method code with example usage: obj.test_image_dataset_from_directory_validation_split() without return types