code: def prepare_data():
      """
      Builds the model and runs.
      """
      data_dir = FLAGS.data_dir
      if FLAGS.tfrecord_output_dir is None:
          tfrecord_output_dir = data_dir
      else:
          tfrecord_output_dir = FLAGS.tfrecord_output_dir
      tx.utils.maybe_create_dir(tfrecord_output_dir)
  
      # Creates a data pre-processor for, e.g., BPE encoding
      proc = processor.get_encoder(FLAGS.pretrain_model_dir)
  
      # Produces TFRecord files
      data_utils.prepare_TFRecord_data(
          data_dir=data_dir,
          max_seq_length=FLAGS.max_seq_length,
          encoder=proc,
          output_dir=tfrecord_output_dir,
      )
  
imports: import tensorflow
  import texar.tf
  from utils import data_utils, processor
label_desc: Use image node_id 1 for calling a global function with example usage: prepare_data() without return types