code: def _get_num_samples_or_steps(ins, batch_size, steps_per_epoch):
      """Returns total number of samples (when training in batch mode) or steps."""
      if steps_per_epoch:
          return steps_per_epoch
      return training_utils_v1.check_num_samples(
          ins, batch_size, steps_per_epoch, "steps_per_epoch"
      )
  
imports: import functools
  import numpy
  from tensorflow.python.data.ops import iterator_ops
  from tensorflow.python.eager import context
  from tensorflow.python.framework import errors
  from tensorflow.python.keras import backend
  from tensorflow.python.keras import callbacks
  from tensorflow.python.keras.distribute import distributed_training_utils_v1
  from tensorflow.python.keras.engine import training_utils_v1
  from tensorflow.python.keras.utils.generic_utils import make_batches
  from tensorflow.python.keras.utils.generic_utils import slice_arrays
  from tensorflow.python.keras.utils.mode_keys import ModeKeys
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.types import data
  from tensorflow.python.util import nest
label_desc: Use image node_id 4 for calling a global function with example usage: _get_num_samples_or_steps(ins, batch_size, steps_per_epoch) and returns: training_utils_v1, steps_per_epoch