docstr: If there are enough hypotheses and that none of the hypotheses being generated can become better than the worst
  one in the heap, then we are done with this sentence.
code: def hypo_is_done(
      self, hypo_idx: int, best_sum_logprobs: float, cur_len: int
  ) -> bool:
      """
      If there are enough hypotheses and that none of the hypotheses being generated can become better than the worst
      one in the heap, then we are done with this sentence.
      """
      if self.hypo_len(hypo_idx) < self.num_beams:
          return False
      elif self.do_early_stopping:
          return True
      else:
          cur_score = best_sum_logprobs / cur_len**self.length_penalty
          ret = (
              self._beam_hyps_worst_scores[hypo_idx].item() >= cur_score
          )
          return ret
  
imports: import copy
  import itertools
  from typing import List, Optional, Tuple
  import torch
  import torch.nn.functional
  from transformers import BartConfig
  from transformers.generation_utils import GenerationMixin
label_desc: Use image node_id 6 for calling the BeamSearchScorerTS obj's underlying member method code with example usage: obj.hypo_is_done(hypo_idx, best_sum_logprobs, cur_len) and returns: False, True, ret