code: def tabbed_parsing_character_generator(tmp_dir, train):
      """Generate source and target data from a single file."""
      character_vocab = text_encoder.ByteTextEncoder()
      filename = "parsing_{0}.pairs".format("train" if train else "dev")
      pair_filepath = os.path.join(tmp_dir, filename)
      return text_problems.text2text_generate_encoded(
          text_problems.text2text_txt_tab_iterator(pair_filepath),
          character_vocab,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  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
label_desc: Use image node_id 2 for calling a global function with example usage: tabbed_parsing_character_generator(tmp_dir, train) and returns: text_problems