code: def is_batched(dataset):
      """Check if the `tf.data.Dataset` is batched."""
      return hasattr(dataset, "_batch_size")
  
imports: import os
  import random
  import time
  import warnings
  from multiprocessing.pool import ThreadPool
  import numpy
  from keras.api_export import keras_export
  from keras.utils import io_utils
  from keras.utils.module_utils import tensorflow
label_desc: Use image node_id 9 for calling a global function with example usage: is_batched(dataset) and returns: hasattr