code: def test_div2k_getitem(open_images_datafolder):
      transform = ToTensor()
  
      for split, true_images in zip(
          ["train", "val", "test"], open_images_datafolder[1]
      ):
          dataset = OpenImagesV6(
              open_images_datafolder[0],
              split=split,
              transform=transform,
          )
  
          for img, true_img in zip(dataset, true_images):
              # because these are saved with JPEG, we need a really high tol
              assert torch.allclose(
                  img, torch.tensor(true_img), rtol=0.01, atol=0.01
              )
  
          assert len(dataset) == len(true_images)
  
file_path: NeuralCompression/tests/data/test_open_images.py
imports: from pathlib import Path
  import numpy
  import pytest
  import torch
  from torchvision.transforms import ToTensor
  from utils import create_deterministic_image, write_image_to_file
  from neuralcompression.data import OpenImagesV6
label_desc: Use image node_id 2 for calling a global function with example usage: test_div2k_getitem(open_images_datafolder) without return types