class_docstr: Beam search implementation.
docstr: Score new hypothesis by `self.part_scorers`.
  
  Args:
      hyp (Hypothesis): Hypothesis with prefix tokens to score
      ids (torch.Tensor): 1D tensor of new partial tokens to score
      x (torch.Tensor): Corresponding input feature
  
  Returns:
      Tuple[Dict[str, torch.Tensor], Dict[str, Any]]: Tuple of
          score dict of `hyp` that has string keys of `self.part_scorers`
          and tensor score values of shape: `(len(ids),)`,
          and state dict that has string keys
          and state values of `self.part_scorers`
docstr_tok: ["Score","new","hypothesis","by","`","self.part_scorers","`",".","Args",":","hyp","(","Hypothesis",")",":","Hypothesis","with","prefix","tokens","to","score","ids","(","torch.Tensor",")",":","1D","tensor","of","new","partial","tokens","to","score","x","(","torch.Tensor",")",":","Corresponding","input","feature","Returns",":","Tuple","[","Dict","[","str",",","torch.Tensor","]",",","Dict","[","str",",","Any","]","]",":","Tuple","of","score","dict","of","`","hyp","`","that","has","string","keys","of","`","self.part_scorers","`","and","tensor","score","values","of","shape",":","`","(","len","(","ids",")",",",")","`",",","and","state","dict","that","has","string","keys","and","state","values","of","`","self.part_scorers","`"]
code: def score_partial(
      self, hyp: Hypothesis, ids: torch.Tensor, x: torch.Tensor
  ) -> Tuple[Dict[str, torch.Tensor], Dict[str, Any]]:
      """Score new hypothesis by `self.part_scorers`.
  
      Args:
          hyp (Hypothesis): Hypothesis with prefix tokens to score
          ids (torch.Tensor): 1D tensor of new partial tokens to score
          x (torch.Tensor): Corresponding input feature
  
      Returns:
          Tuple[Dict[str, torch.Tensor], Dict[str, Any]]: Tuple of
              score dict of `hyp` that has string keys of `self.part_scorers`
              and tensor score values of shape: `(len(ids),)`,
              and state dict that has string keys
              and state values of `self.part_scorers`
  
      """
      scores = dict()
      states = dict()
      for k, d in self.part_scorers.items():
          scores[k], states[k] = d.score_partial(
              hyp.yseq, ids, hyp.states[k], x
          )
      return scores, states
  
imports: import logging
  from itertools import chain
  from typing import Any, Dict, List, NamedTuple, Tuple, Union
  import torch
  from espnet.nets.e2e_asr_common import end_detect
  from espnet.nets.scorer_interface import PartialScorerInterface, ScorerInterface
label_desc: Use image node_id 6 for calling the BeamSearch obj's underlying member method code with example usage: obj.score_partial(hyp, ids, x) and returns: scores,  states