code: def test_basic_load(self, device, loader_params):
      loader = TorchImageLoader(
          resize=False, normalize=False, device=device, **loader_params
      )
      torch_device = torch.device(device)
      images, sizes = loader(
          [self.TEST_DIR / "image1.jpg", self.TEST_DIR / "image2.jpg"]
      )
      assert images.device == torch_device
      assert sizes.device == torch_device
      assert images.shape[0] == 2
      assert images.shape[1] == 3
      assert sizes.shape == (2, 2)
      assert list(sizes[0]) == [7, 15]
      assert list(sizes[1]) == [9, 12]
      if loader.size_divisibility <= 1:
          assert images.shape[2] == 9
          assert images.shape[3] == 15
      else:
          assert images.shape[2] >= 9
          assert images.shape[3] >= 15
          assert (images.shape[2] / loader.size_divisibility) % 1 == 0
  
      image, size = loader(self.TEST_DIR / "image1.jpg")
      assert image.device == torch_device
      assert size.device == torch_device
      assert len(image.shape) == 3
      assert list(size) == [7, 15]
  
file_path: allennlp/tests/data/image_loader_test.py
imports: import pytest
  import torch
  import torchvision
  from allennlp.common.testing import AllenNlpTestCase, multi_device
  from allennlp.data.image_loader import TorchImageLoader
label_desc: Use image node_id 2 for calling the TorchImageLoaderTest obj's underlying member method code with example usage: obj.test_basic_load(device, loader_params) without return types