code: def test_instantiate(self, device: torch.device):
      hyps = BatchedHyps(batch_size=2, init_length=3, device=device)
      assert torch.is_tensor(hyps.timesteps)
      # device: for mps device we need to use `type`, not directly compare
      assert hyps.timesteps.device.type == device.type
      assert hyps.timesteps.shape == (2, 3)
  
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 1 for calling the TestBatchedHyps obj's underlying member method code with example usage: obj.test_instantiate(device) without return types