class_docstr: Batch beam search implementation.
docstr: Merge states for new hypothesis.
  
  Args:
      states: states of `self.full_scorers`
      part_states: states of `self.part_scorers`
      part_idx (int): The new token id for `part_scores`
  
  Returns:
      Dict[str, torch.Tensor]: The new score dict.
          Its keys are names of `self.full_scorers` and `self.part_scorers`.
          Its values are states of the scorers.
docstr_tok: ["Merge","states","for","new","hypothesis",".","Args",":","states",":","states","of","`","self.full_scorers","`","part_states",":","states","of","`","self.part_scorers","`","part_idx","(","int",")",":","The","new","token","id","for","`","part_scores","`","Returns",":","Dict","[","str",",","torch.Tensor","]",":","The","new","score","dict",".","Its","keys","are","names","of","`","self.full_scorers","`","and","`","self.part_scorers","`",".","Its","values","are","states","of","the","scorers","."]
code: def merge_states(
      self, states: Any, part_states: Any, part_idx: int
  ) -> Any:
      """Merge states for new hypothesis.
  
      Args:
          states: states of `self.full_scorers`
          part_states: states of `self.part_scorers`
          part_idx (int): The new token id for `part_scores`
  
      Returns:
          Dict[str, torch.Tensor]: The new score dict.
              Its keys are names of `self.full_scorers` and `self.part_scorers`.
              Its values are states of the scorers.
  
      """
      new_states = dict()
      for k, v in states.items():
          new_states[k] = v
      for k, v in part_states.items():
          new_states[k] = v
      return new_states
  
imports: import logging
  from typing import Any, Dict, List, NamedTuple, Tuple
  import torch
  from packaging.version import parse
  from torch.nn.utils.rnn import pad_sequence
  from espnet.nets.beam_search import BeamSearch, Hypothesis
label_desc: Use image node_id 9 for calling the BatchBeamSearch obj's underlying member method code with example usage: obj.merge_states(states, part_states, part_idx) and returns: new_states