code: def test_kodak_image_dataset(
      img_sizes, num_imgs, tmp_path, monkeypatch
  ):
      def _check_integrity_mock(a, b):
          return True
  
      monkeypatch.setattr(
          Kodak, "_check_integrity", _check_integrity_mock
      )
  
      kodak_root = tmp_path / "kodak"
      kodak_root.mkdir()
  
      test_imgs = []
      for i in range(num_imgs):
          size = img_sizes[np.random.randint(len(img_sizes))]
          test_imgs.append(
              create_random_image(
                  f"{kodak_root}/kodim{i+1:02d}.png", size
              )
          )
  
      kodak_dataset = Kodak(
          kodak_root,
          transform=tv_transforms.Compose([tv_transforms.ToTensor()]),
      )
  
      for i in range(num_imgs):
          assert torch.isclose(test_imgs[i], kodak_dataset[i]).all()
  
imports: import numpy
  import pytest
  import torch
  from PIL import Image
  from torchvision import transforms
  from neuralcompression.data import Kodak
label_desc: Use image node_id 2 for calling a global function with example usage: test_kodak_image_dataset(img_sizes, num_imgs, tmp_path, monkeypatch) and returns: True