code: def encode_dataset(dataset, vocabulary):
      """Encode from strings to token ids.
  
      Args:
        dataset: a tf.data.Dataset with string values.
        vocabulary: a mesh_tensorflow.transformer.Vocabulary
      Returns:
        a tf.data.Dataset with integer-vector values ending in EOS=1
      """
  
      def encode(features):
          return {
              k: vocabulary.encode_tf(v) for k, v in features.items()
          }
  
      return dataset.map(
          encode, num_parallel_calls=tf.data.experimental.AUTOTUNE
      )
  
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 3 for calling a global function with example usage: encode_dataset(dataset, vocabulary) and returns: dataset, unknown