code: def get_labels_encoder(self, data_dir):
      
      label_filepath = os.path.join(data_dir, self.vocab_filename)
      return text_encoder.TokenTextEncoder(label_filepath)
docs: Builds encoder for the given class labels.
  
      Args:
        data_dir: data directory
  
      Returns:
        An encoder for class labels.