code: def test_add_multiple_results(self, device: torch.device):
      # batch of size 2, add label for first utterance, then add labels for both utterances
      hyps = BatchedHyps(batch_size=2, init_length=1, device=device)
      hyps.add_results_(
          active_indices=torch.tensor([0], device=device),
          labels=torch.tensor([5], device=device),
          time_indices=torch.tensor([1], device=device),
          scores=torch.tensor([0.5], device=device),
      )
      hyps.add_results_(
          active_indices=torch.tensor([0, 1], device=device),
          labels=torch.tensor([2, 4], device=device),
          time_indices=torch.tensor([1, 2], device=device),
          scores=torch.tensor([1.0, 1.0], device=device),
      )
      assert hyps.current_lengths.tolist() == [2, 1]
      assert hyps.transcript.tolist()[0][:2] == [5, 2]
      assert hyps.transcript.tolist()[1][:1] == [4]
      assert hyps.timesteps.tolist()[0][:2] == [1, 1]
      assert hyps.timesteps.tolist()[1][:1] == [2]
      assert hyps.scores.tolist() == pytest.approx([1.5, 1.0])
      assert hyps.last_timestep.tolist() == [1, 2]
      assert hyps.last_timestep_lasts.tolist() == [2, 1]
  
imports: from typing import List
  import pytest
  import torch
  from nemo.collections.asr.parts.utils.rnnt_utils import BatchedAlignments, BatchedHyps, batched_hyps_to_hypotheses
label_desc: Use image node_id 5 for calling the TestBatchedHyps obj's underlying member method code with example usage: obj.test_add_multiple_results(device) without return types