class_docstr: Adapter for `keras.utils.PyDataset` instances.
code: def _set_tf_output_signature(self):
      from keras.utils.module_utils import tensorflow as tf
  
      def get_tensor_spec(x):
          shape = x.shape
          if len(shape) < 1:
              raise ValueError(
                  "The arrays returned by PyDataset.__getitem__() "
                  "must be at least rank 1. Received: "
                  f"{x} of rank {len(x.shape)}"
              )
          shape = list(shape)
          shape[
              0
          ] = None  # The batch size is not guaranteed to be static.
          return tf.TensorSpec(shape=shape, dtype=x.dtype.name)
  
      # Grab the first example
      batch = self.py_dataset[0]
      # Run checks on it and format it
      batch = self._standardize_batch(batch)
      self._output_signature = tree.map_structure(
          get_tensor_spec, batch
      )
  
imports: import multiprocessing.dummy
  import queue
  import random
  import threading
  import time
  import warnings
  import weakref
  from contextlib import closing
  import numpy
  import tree
  from keras.api_export import keras_export
  from keras.trainers.data_adapters import data_adapter_utils
  from keras.trainers.data_adapters.data_adapter import DataAdapter
label_desc: Use image node_id 2 for calling the PyDatasetAdapter obj's underlying member method code with example usage: obj._set_tf_output_signature() and returns: tf