code: def _decode(self, tokens, encoder_outs, incremental_states, n_srcs=1):
      # Source sentences are weighted equally (for now)
      srcs_weights = [1 / n_srcs] * n_srcs
  
      avg_probs = None
      avg_attn = None
      for src_id, src_weight in enumerate(srcs_weights):
          for model_id, (model_weight, model) in enumerate(
              zip(self.model_weights, self.models)
          ):
              with torch.no_grad():
                  encoder_out = encoder_outs[src_id][model_id]
                  incremental_state = incremental_states[
                      (src_id, model_id)
                  ]
                  decoder_out = list(
                      model.decoder(
                          tokens, encoder_out, incremental_state
                      )
                  )
                  decoder_out[0] = decoder_out[0][:, -1, :]
                  attn = decoder_out[1]
                  if len(decoder_out) == 3:
                      possible_translation_tokens = decoder_out[2]
                  else:
                      possible_translation_tokens = None
              probs = (
                  src_weight
                  * model_weight
                  * model.get_normalized_probs(
                      decoder_out, log_probs=False
                  )
              )
              if avg_probs is None:
                  avg_probs = probs
              else:
                  avg_probs.add_(probs)
              if attn is not None and src_id == self.align_to:
                  attn = attn[:, -1, :]
                  if avg_attn is None:
                      avg_attn = attn
                  else:
                      avg_attn.add_(attn)
      avg_probs.log_()
      if avg_attn is not None:
          avg_attn.div_(len(self.models))
  
      return avg_probs, avg_attn, possible_translation_tokens
  
file_path: translate/pytorch_translate/research/multisource/multisource_decode.py
imports: import math
  import torch
  from fairseq import utils
  from fairseq.models import FairseqIncrementalDecoder
label_desc: Use image node_id 8 for calling the MultiSourceSequenceGenerator obj's underlying member method code with example usage: obj._decode(tokens, encoder_outs, incremental_states, n_srcs) and returns: avg_probs,  avg_attn,  possible_translation_tokens