docstr: Generate a batch of translations.
docstr_tok: ["Generate","a","batch","of","translations","."]
code: def generate(
      self,
      encoder_inputs,
      srcs_ids,
      beam_size=None,
      maxlen=None,
      prefix_tokens=None,
      src_weights=None,
  ):
      """Generate a batch of translations."""
      with torch.no_grad():
          return self._generate(
              encoder_inputs,
              srcs_ids,
              beam_size,
              maxlen,
              prefix_tokens,
              src_weights,
          )
  
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 4 for calling the MultiSourceSequenceGenerator obj's underlying member method code with example usage: obj.generate(encoder_inputs, srcs_ids, beam_size, maxlen, prefix_tokens, src_weights) and returns: self