docstr: For a batch of input and its prediction, return a list of batch predict
  alignment src indice Tensor in size ``(batch, n_best,)``.
docstr_tok: ["For","a","batch","of","input","and","its","prediction",",","return","a","list","of","batch","predict","alignment","src","indice","Tensor","in","size","``","(","batch",",","n_best",",",")","``","."]
code: def _align_forward(self, batch, predictions):
      """
      For a batch of input and its prediction, return a list of batch predict
      alignment src indice Tensor in size ``(batch, n_best,)``.
      """
      raise NotImplementedError
  
imports: import torch
  from torch.nn.functional import log_softmax
  from torch.nn.utils.rnn import pad_sequence
  import codecs
  from time import time
  from math import exp
  from itertools import count, zip_longest
  from copy import deepcopy
  import onmt.model_builder
  import onmt.decoders.ensemble
  from onmt.constants import DefaultTokens
  from onmt.translate.beam_search import BeamSearch, BeamSearchLM
  from onmt.translate.greedy_search import GreedySearch, GreedySearchLM
  from onmt.utils.misc import tile, set_random_seed, report_matrix
  from onmt.utils.alignment import extract_alignment, build_align_pharaoh
  from onmt.modules.copy_generator import collapse_copy_scores
  from onmt.constants import ModelTask
  from onmt.transforms import TransformPipe
label_desc: Use image node_id 2 for calling the GeneratorLM obj's underlying member method code with example usage: obj._align_forward(batch, predictions) without return types