code: def main():
      parser = argparse.ArgumentParser(sys.argv[0])
      parser.add_argument(
          "--sys",
          nargs="*",
          default="",
          metavar="FILE",
          help="path to system output",
      )
      parser.add_argument(
          "--ref", default="", metavar="FILE", help="path to references"
      )
      parser.add_argument(
          "--output",
          default="",
          metavar="FILE",
          help="print outputs into a pretty format",
      )
      args = parser.parse_args()
  
      if args.sys:
          src, tgt, hypos, log_probs = load_sys(args.sys)
          print("pairwise BLEU: %.2f" % pairwise(hypos))
          if args.output:
              merge(src, tgt, hypos, log_probs, args.output)
  
      if args.ref:
          _, _, refs = load_ref(args.ref)
          if args.sys:
              multi_ref(refs, hypos)
          else:
              intra_ref(refs)
  
file_path: fairseq/examples/translation_moe/score.py
imports: import argparse
  import random
  import sys
  from itertools import chain
  import numpy
  import sacrebleu
  from sacrebleu import corpus_bleu
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types