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