code: def get_tfds_vocabulary(dataset_name=gin.REQUIRED):
      info = tfds.builder(dataset_name).info
      # this assumes that either there are no inputs, or that the
      # inputs and targets have the same vocabulary.
      return TFDSVocabulary(
          info.features[info.supervised_keys[1]].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 for calling a global function with example usage: get_tfds_vocabulary(dataset_name) and returns: TFDSVocabulary