code: def test_array_input(self, test_data, expected_shape):
      result = ToTensor(
          dtype=torch.float32, device="cpu", wrap_sequence=True
      )(test_data)
      self.assertTrue(isinstance(result, torch.Tensor))
      assert_allclose(result, test_data, type_test=False)
      self.assertTupleEqual(result.shape, expected_shape)
  
file_path: MONAI/tests/test_to_tensor.py
imports: from __future__ import annotations
  import unittest
  import torch
  from parameterized import parameterized
  from monai.transforms import ToTensor
  from tests.utils import HAS_CUPY, TEST_NDARRAYS, assert_allclose, optional_import
label_desc: Use image node_id 1 for calling the TestToTensor obj's underlying member method code with example usage: obj.test_array_input(test_data, expected_shape) without return types