code: def prepare_result_files(args):
      def get_res_file(file_prefix):
          if args.num_shards > 1:
              file_prefix = f"{args.shard_id}_{file_prefix}"
          path = os.path.join(
              args.results_path,
              "{}-{}-{}.txt".format(
                  file_prefix,
                  os.path.basename(args.path),
                  args.gen_subset,
              ),
          )
          return open(path, "w", buffering=1)
  
      if not args.results_path:
          return None
  
      return {
          "hypo.words": get_res_file("hypo.word"),
          "hypo.units": get_res_file("hypo.units"),
          "ref.words": get_res_file("ref.word"),
          "ref.units": get_res_file("ref.units"),
      }
  
imports: import ast
  import logging
  import math
  import os
  import sys
  import editdistance
  import numpy
  import torch
  from fairseq import checkpoint_utils, options, progress_bar, tasks, utils
  from fairseq.data.data_utils import post_process
  from fairseq.logging.meters import StopwatchMeter, TimeMeter
label_desc: Use image node_id 5 for calling a global function with example usage: prepare_result_files(args) and returns: dict, open, None