code: def test_div2k_getitem(div2k_datafolder):
      transform = ToTensor()
      dataset = DIV2KDataset(div2k_datafolder[0], transform=transform)
  
      true_images = div2k_datafolder[1]
      for img, true_img in zip(dataset, true_images):
          assert torch.allclose(img, torch.tensor(true_img))
  
      assert len(dataset) == len(true_images)
  
file_path: NeuralCompression/tests/data/test_div2k.py
imports: from pathlib import Path
  import numpy
  import pytest
  import torch
  from torchvision.transforms import ToTensor
  from utils import create_random_image, write_image_to_file
  from neuralcompression.data import DIV2KDataset
label_desc: Use image node_id 2 for calling a global function with example usage: test_div2k_getitem(div2k_datafolder) without return types