parameters: (data, steps_per_epoch)
return_statement: return steps_per_epoch, True
docstring: Returns number of samples or steps, and whether to use steps count mode.
docstring_summary: Returns number of samples or steps, and whether to use steps count mode.
docstring_tokens: Returns number of samples or steps and whether to use steps count mode .
function: def _get_num_samples_or_steps(data, steps_per_epoch):
    """Returns number of samples or steps, and whether to use steps count mode."""
    flat_inputs = nest.flatten(data)
    if hasattr(flat_inputs[0], 'shape'):
      return int(flat_inputs[0].shape[0]), False
    return steps_per_epoch, True
function_tokens: def _get_num_samples_or_steps ( data , steps_per_epoch ) : flat_inputs = nest . flatten ( data ) if hasattr ( flat_inputs [ 0 ] , 'shape' ) : return int ( flat_inputs [ 0 ] . shape [ 0 ] ) , False return steps_per_epoch , True