code: def get_training_dataset(
      batch_size=128,
      dataset="cifar10",
      split="90%",
      shuffle_buffer_size=45000,
  ):
      """Returns a tf.data.Dataset with preprocessed and batched training data."""
      ds = tfds.load(dataset, split=f"train[:{split}]")
      ds = ds.map(convert_to_tuples)
      ds = ds.shuffle(
          shuffle_buffer_size, reshuffle_each_iteration=True
      ).repeat()
      return (
          ds.map(preprocess_image)
          .map(normalize_image)
          .batch(batch_size)
      )
  
file_path: neural-structured-learning/research/multi_representation_adversary/multi_representation_adversary/data.py
imports: import gin
  import tensorflow.compat.v2
  import tensorflow_datasets
label_desc: Use image node_id 4 for calling a global function with example usage: get_training_dataset(batch_size, dataset, split, shuffle_buffer_size) and returns: ds