code: def score(self, src_tokens, hypos):
      if self.model is None:
          return
  
      _, tgt_tokens = self.prepare_inputs(src_tokens, hypos)
  
      decoder_out = self.model.decoder(tgt_tokens)
      logprobs = self.model.get_normalized_probs(
          decoder_out, log_probs=True
      )
      hypos_tokens_probs = logprobs.gather(
          dim=2, index=tgt_tokens.unsqueeze(2)
      ).squeeze(2)
  
      pad = self.task.dictionary.pad_index
      hypos_tokens_probs = (
          tgt_tokens != pad
      ).float() * hypos_tokens_probs
  
      return hypos_tokens_probs.sum(dim=1)
  
imports: import torch
  from pytorch_translate import utils
label_desc: Use image node_id 2 for calling the LMScorer obj's underlying member method code with example usage: obj.score(src_tokens, hypos) and returns: hypos_tokens_probs