class_docstr: Base class for input data adapters.
  
  The purpose of a DataAdapter is to provide a unfied interface to
  iterate over input data provided in a variety of formats -- such as
  NumPy arrays, tf.Tensors, tf.data.Datasets, Keras PyDatasets, etc.
docstr: Return the size (number of batches) for the dataset created.
  
  For certain type of the data input, the number of batches is known, eg
  for Numpy data, the size is same as (number_of_element / batch_size).
  Whereas for dataset or python generator, the size is unknown since it
  may or may not have an end state.
  
  Returns:
      int, the number of batches for the dataset, or None if it is
      unknown.  The caller could use this to control the loop of training,
      show progress bar, or handle unexpected StopIteration error.
docstr_tok: ["Return","the","size","(","number","of","batches",")","for","the","dataset","created",".","For","certain","type","of","the","data","input",",","the","number","of","batches","is","known",",","eg","for","Numpy","data",",","the","size","is","same","as","(","number_of_element","\/","batch_size",")",".","Whereas","for","dataset","or","python","generator",",","the","size","is","unknown","since","it","may","or","may","not","have","an","end","state",".","Returns",":","int",",","the","number","of","batches","for","the","dataset",",","or","None","if","it","is","unknown",".","The","caller","could","use","this","to","control","the","loop","of","training",",","show","progress","bar",",","or","handle","unexpected","StopIteration","error","."]
code: def num_batches(self):
      """Return the size (number of batches) for the dataset created.
  
      For certain type of the data input, the number of batches is known, eg
      for Numpy data, the size is same as (number_of_element / batch_size).
      Whereas for dataset or python generator, the size is unknown since it
      may or may not have an end state.
  
      Returns:
          int, the number of batches for the dataset, or None if it is
          unknown.  The caller could use this to control the loop of training,
          show progress bar, or handle unexpected StopIteration error.
      """
      raise NotImplementedError
  
file_path: keras/keras/trainers/data_adapters/data_adapter.py
label_desc: Use image node_id 3 for calling the DataAdapter obj's underlying member method code with example usage: obj.num_batches() without return types