def _flatten_value_to_list(batch_values):
  """Converts an N-D dense or sparse batch to a 1-D list."""
  # Ravel for flattening and tolist so that we go to native Python types
  # for more efficient followup processing.
  #
  batch_value, = batch_values
  return batch_value.ravel().tolist()