class_docstr: Reranks n-best hypotheses based on extra models and parameters
docstr: computes p(x|y) for each hypothesis.
docstr_tok: ["computes","p","(","x|y",")","for","each","hypothesis","."]
code: def compute_lm_scores(self, src_tokens, hypos, scores):
      """computes p(x|y) for each hypothesis."""
      if not self.lm_scorer:
          return
  
      lm_scores = self.lm_scorer.score(src_tokens, hypos)
      scores[:, FeatureList.LM_SCORE.value] = lm_scores[:]
  
imports: import argparse
  import pickle
  from enum import Enum
  import torch
  from fairseq.scoring import bleu
  from pytorch_translate import hybrid_transformer_rnn, utils
  from pytorch_translate.rescoring.model_scorers import LMScorer, R2LModelScorer, ReverseModelScorer, SimpleModelScorer
  from pytorch_translate.research.rescore import cloze_transformer_model
  from pytorch_translate.tasks import pytorch_translate_task
  from tqdm import tqdm
label_desc: Use image node_id 6 for calling the Rescorer obj's underlying member method code with example usage: obj.compute_lm_scores(src_tokens, hypos, scores) without return types