def METHOD_NAME(filenames, num_epochs, batch_size=None):
  repeat_dataset = readers.FixedLengthRecordDataset(
      filenames,
      self._record_bytes,
      self._header_bytes,
      self._footer_bytes,
      compression_type=compression_type).repeat(num_epochs)
  if batch_size:
    return repeat_dataset.batch(batch_size)
  return repeat_dataset