code: def score_fusion(
      args, forward_scores, rev_scores, lm_scores, src_lens, tgt_lens
  ):
      """
      Fuse forward, reverse and language model scores.
      """
      fused_scores = []
      for forward_score, rev_score, lm_score, src_len, tgt_len in zip(
          forward_scores, rev_scores, lm_scores, src_lens, tgt_lens
      ):
          score = 0
  
          forward_score = (
              forward_score / tgt_len
              if args.length_normalize_scores
              else forward_score
          )
          score += args.forward_model_coef * forward_score
  
          rev_score = (
              rev_score / src_len
              if args.length_normalize_scores
              else rev_score
          )
          score += args.reverse_model_coef * rev_score
  
          lm_score = (
              lm_score / tgt_len
              if args.length_normalize_scores
              else lm_score
          )
          score += args.target_lm_coef * lm_score
  
          if args.len_pen is not None:
              score = score / (((5 + tgt_len) / 6) ** args.len_pen)
  
          fused_scores.append(score)
  
      return fused_scores
  
imports: from argparse import ArgumentParser
  import numpy
  import torch
  import nemo.collections.nlp
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling a global function with example usage: score_fusion(args, forward_scores, rev_scores, lm_scores, src_lens, tgt_lens) and returns: fused_scores