class_docstr: Lambada as reading comprehension task.
class_docstr_tok: ["Lambada","as","reading","comprehension","task","."]
docstr: Builds encoder for the given class labels.
  
  Args:
    data_dir: data directory
  
  Returns:
    An encoder for class labels.
code: def get_labels_encoder(self, data_dir):
      """Builds encoder for the given class labels.
  
      Args:
        data_dir: data directory
  
      Returns:
        An encoder for class labels.
      """
      label_filepath = os.path.join(data_dir, self.vocab_filename)
      return text_encoder.TokenTextEncoder(
          label_filepath, replace_oov=self.oov_token
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import csv
  import os
  import tarfile
  from tensor2tensor.data_generators import generator_utils
  from tensor2tensor.data_generators import problem
  from tensor2tensor.data_generators import text_encoder
  from tensor2tensor.data_generators import text_problems
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling the LambadaRc obj's underlying member method code with example usage: obj.get_labels_encoder(data_dir) and returns: text_encoder