code: def pretokenized_t2t_dataset(
      dataset_name=gin.REQUIRED,
      text2self=False,
      data_dir=gin.REQUIRED,
      dataset_split="train",
      batch_size=None,
      sequence_length=gin.REQUIRED,
      vocabulary=None,
      eos_included=True,
      vocab_shift=0,
  ):
      """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, DEPRECATED
        sequence_length: an integer
        vocabulary: ignored
        eos_included: a boolean
        vocab_shift: an optional integer - add this value to all ids read
  
      Returns:
        A tf.data.Dataset of batches
      """
      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=eos_included,
          repeat=dataset_split == "train",
          batch_size=batch_size,
          sequence_length=sequence_length,
          vocab_shift=vocab_shift,
      )
      if dataset_split == "train":
          dataset = dataset.shuffle(1000)
      return dataset
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import os
  import gin
  import tensorflow.compat.v1
  import tensorflow_datasets
label_desc: Use image node_id 13 for calling a global function with example usage: pretokenized_t2t_dataset(dataset_name, text2data_dir, dataset_split, batch_size, sequence_length, vocabulary, eos_included, vocab_shift) and returns: dataset