code: def test_torch_jit_compatibility(self, device: torch.device):
      @torch.jit.script
      def hyps_add_wrapper(
          active_indices: torch.Tensor,
          labels: torch.Tensor,
          time_indices: torch.Tensor,
          scores: torch.Tensor,
      ):
          hyps = BatchedHyps(
              batch_size=2, init_length=3, device=active_indices.device
          )
          hyps.add_results_(
              active_indices=active_indices,
              labels=labels,
              time_indices=time_indices,
              scores=scores,
          )
          return hyps
  
      scores = torch.tensor([0.1, 0.1], device=device)
      hyps = hyps_add_wrapper(
          torch.tensor([0, 1], device=device),
          torch.tensor([2, 4], device=device),
          torch.tensor([0, 0], device=device),
          scores,
      )
      assert torch.allclose(hyps.scores, scores)
  
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 6 for calling the TestBatchedHyps obj's underlying member method code with example usage: obj.test_torch_jit_compatibility(device) and returns: hyps