class_docstr: Wrapper for tensorflow_datasets encoders.
  
  In the TFDS encoders, ID=0 is reserved for padding.
  We want to also reserve ID=1 for EOS, so we shift all IDs up by 1.
class_docstr_tok: ["Wrapper","for","tensorflow_datasets","encoders",".","In","the","TFDS","encoders",",","ID=0","is","reserved","for","padding",".","We","want","to","also","reserve","ID=1","for","EOS",",","so","we","shift","all","IDs","up","by","1","."]
code: def __init__(self, tfds_encoder):
      self._tfds_encoder = tfds_encoder
  
file_path: mesh/mesh_tensorflow/transformer/vocabulary.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import gin
  import tensorflow_datasets
label_desc: Use image node_id 1 to create a new TFDSVocabulary object from inherited base classes: Vocabulary with example: obj = TFDSVocabulary(tfds_encoder)