code: def pretokenized_t2t_dataset(dataset_name=gin.REQUIRED,
                               text2self=False,
                               data_dir=gin.REQUIRED,
                               dataset_split="train",
                               batch_size=gin.REQUIRED,
                               sequence_length=gin.REQUIRED,
                               vocabulary=None):
    
    del vocabulary
    filepattern = os.path.join(
        data_dir, dataset_name + "-" + dataset_split + "-*")
    filenames = tf.gfile.Glob(filepattern)
    tf.logging.info("Found %s files matching %s" % (len(filenames), filepattern))
    if not filenames:
      raise ValueError("No matching files found")
    dataset = pretokenized_tfrecord_dataset(
        filenames=filenames,
        text2self=text2self,
        eos_included=True,
        repeat=dataset_split == "train",
        batch_size=batch_size,
        sequence_length=sequence_length)
    if dataset_split == "train":
      dataset = dataset.shuffle(1000)
    return dataset
docs: Loads the Tensor2tensor dataset specified by dataset_name.
  
    Args:
      dataset_name: TensorFlow Datasets dataset name.
      text2self: a boolean
      data_dir: string, data_dir for TensorFlow Datasets
      dataset_split: a string - "train" or "dev"
      batch_size: an integer
      sequence_length: an integer
      vocabulary: ignored
  
    Returns:
      A tf.data.Dataset of batches