class_docstr: Beam search implementation for Transducer.
  
  Args:
      decoder: Decoder module.
      joint_network: Joint network module.
      beam_size: Size of the beam.
      lm: LM module.
      lm_weight: LM weight for soft fusion.
      search_type: Search algorithm to use during inference.
      max_sym_exp: Number of maximum symbol expansions at each time step. (TSD)
      u_max: Maximum expected target sequence length. (ALSD)
      nstep: Number of maximum expansion steps at each time step. (mAES)
      expansion_gamma: Allowed logp difference for prune-by-value method. (mAES)
      expansion_beta:
           Number of additional candidates for expanded hypotheses selection. (mAES)
      score_norm: Normalize final scores by length.
      nbest: Number of final hypothesis.
      streaming: Whether to perform chunk-by-chunk beam search.
class_docstr_tok: ["Beam","search","implementation","for","Transducer",".","Args",":","decoder",":","Decoder","module",".","joint_network",":","Joint","network","module",".","beam_size",":","Size","of","the","beam",".","lm",":","LM","module",".","lm_weight",":","LM","weight","for","soft","fusion",".","search_type",":","Search","algorithm","to","use","during","inference",".","max_sym_exp",":","Number","of","maximum","symbol","expansions","at","each","time","step",".","(","TSD",")","u_max",":","Maximum","expected","target","sequence","length",".","(","ALSD",")","nstep",":","Number","of","maximum","expansion","steps","at","each","time","step",".","(","mAES",")","expansion_gamma",":","Allowed","logp","difference","for","prune-by-value","method",".","(","mAES",")","expansion_beta",":","Number","of","additional","candidates","for","expanded","hypotheses","selection",".","(","mAES",")","score_norm",":","Normalize","final","scores","by","length",".","nbest",":","Number","of","final","hypothesis",".","streaming",":","Whether","to","perform","chunk-by-chunk","beam","search","."]
docstr: Recombine hypotheses with same label ID sequence.
  
  Args:
      hyps: Hypotheses.
  
  Returns:
      final: Recombined hypotheses.
docstr_tok: ["Recombine","hypotheses","with","same","label","ID","sequence",".","Args",":","hyps",":","Hypotheses",".","Returns",":","final",":","Recombined","hypotheses","."]
code: def recombine_hyps(self, hyps: List[Hypothesis]) -> List[Hypothesis]:
      """Recombine hypotheses with same label ID sequence.
  
      Args:
          hyps: Hypotheses.
  
      Returns:
          final: Recombined hypotheses.
  
      """
      final = {}
  
      for hyp in hyps:
          str_yseq = "_".join(map(str, hyp.yseq))
  
          if str_yseq in final:
              final[str_yseq].score = np.logaddexp(
                  final[str_yseq].score, hyp.score
              )
          else:
              final[str_yseq] = hyp
  
      return [*final.values()]
  
imports: from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from espnet2.asr_transducer.decoder.abs_decoder import AbsDecoder
  from espnet2.asr_transducer.joint_network import JointNetwork
label_desc: Use image node_id 5 for calling the BeamSearchTransducer obj's underlying member method code with example usage: obj.recombine_hyps(hyps) and returns: list