class_docstr: Base class inheritted by all data classes.
      
class_docstr_tok: ["Base","class","inheritted","by","all","data","classes","."]
code: def _make_batch(
      dataset, hparams, padded_batch=False, padding_values=None
  ):
      dataset = dataset.repeat(hparams.num_epochs)
      batch_size = hparams["batch_size"]
      if hparams["allow_smaller_final_batch"]:
          if padded_batch:
              dataset = dataset.padded_batch(
                  batch_size,
                  dataset.output_shapes,
                  padding_values=padding_values,
              )
          else:
              dataset = dataset.batch(batch_size)
      else:
          dataset = dataset.apply(
              tf.contrib.data.padded_batch_and_drop_remainder(
                  batch_size,
                  dataset.output_shapes,
                  padding_values=padding_values,
              )
          )
      return dataset
  
file_path: texar/texar/tf/data/data/data_base.py
imports: import tensorflow
  from texar.tf.hyperparams import HParams
  from texar.tf.data.data import dataset_utils
  from texar.tf.data.data_utils import count_file_lines
label_desc: Use image node_id 3 for calling the DataBase obj's underlying member method code with example usage: obj._make_batch(dataset, hparams, padded_batch, padding_values) and returns: dataset