code: def decode_text_from_nbest_hypotheses(hyps, decoding):
      hypotheses = []
      all_hypotheses = []
  
      for nbest_hyp in hyps:  # type: rnnt_utils.NBestHypotheses
          n_hyps = (
              nbest_hyp.n_best_hypotheses
          )  # Extract all hypotheses for this sample
          decoded_hyps = decoding.decode_hypothesis(
              n_hyps
          )  # type: List[str]
  
          hypotheses.append(decoded_hyps[0])  # best hypothesis
          all_hypotheses.append(decoded_hyps)
  
      return hypotheses, all_hypotheses
  
imports: import os
  from functools import lru_cache
  import pytest
  import torch
  from omegaconf import DictConfig
  from nemo.collections.asr.models import ASRModel
  from nemo.collections.asr.modules import RNNTDecoder, RNNTJoint
  from nemo.collections.asr.parts.mixins import mixins
  from nemo.collections.asr.parts.submodules import rnnt_beam_decoding
  from nemo.collections.asr.parts.submodules import rnnt_greedy_decoding
  from nemo.collections.asr.parts.submodules.rnnt_decoding import RNNTBPEDecoding, RNNTDecoding, RNNTDecodingConfig
  from nemo.collections.asr.parts.utils import rnnt_utils
  from nemo.core.utils import numba_utils
  from nemo.core.utils.numba_utils import __NUMBA_MINIMUM_VERSION__
label_desc: Use image node_id 7 for calling a global function with example usage: decode_text_from_nbest_hypotheses(hyps, decoding) and returns: hypotheses,  all_hypotheses