class_docstr: Base class inheritted by all text data classes.
      
code: def _make_batch(
      dataset,
      hparams,
      element_length_func,
      padded_shapes=None,
      padding_values=None,
  ):
      dataset = dataset.repeat(hparams.num_epochs)
  
      batch_size = hparams["batch_size"]
      bucket_boundaries = hparams["bucket_boundaries"]
      if padded_shapes is None:
          padded_shapes = dataset.output_shapes
  
      if len(bucket_boundaries) == 0:
          if hparams["allow_smaller_final_batch"]:
              dataset = dataset.padded_batch(
                  batch_size,
                  padded_shapes,
                  padding_values=padding_values,
              )
          else:
              dataset = dataset.apply(
                  tf.contrib.data.padded_batch_and_drop_remainder(
                      batch_size,
                      padded_shapes,
                      padding_values=padding_values,
                  )
              )
      else:
          bucket_batch_size = hparams["bucket_batch_sizes"]
          if bucket_batch_size is None:
              bucket_batch_size = [batch_size] * (
                  len(bucket_boundaries) + 1
              )
          dataset = dataset.apply(
              tf.contrib.data.bucket_by_sequence_length(
                  element_length_func,
                  bucket_boundaries,
                  bucket_batch_size,
                  padded_shapes=padded_shapes,
                  padding_values=padding_values,
              )
          )
          if not hparams["allow_smaller_final_batch"]:
              if len(set(bucket_batch_size)) > 1:
                  raise ValueError(
                      "Batch size of every bucket must be the same if "
                      "smaller final batch is not allowed."
                  )
              batch_size = bucket_batch_size[0]
              filter_fn = dsutils._make_smaller_batch_filter_fn(
                  batch_size
              )
              dataset = dataset.filter(
                  lambda *args: filter_fn(dsutils.maybe_tuple(args))
              )
  
      return dataset
  
imports: import tensorflow
  from texar.tf.data.data.data_base import DataBase
  from texar.tf.data.data import dataset_utils
label_desc: Use image node_id 3 for calling the TextDataBase obj's underlying member method code with example usage: obj._make_batch(dataset, hparams, element_length_func, padded_shapes, padding_values) and returns: dataset