code: def open_images_datafolder(tmp_path: Path):
      rng = numpy.random.default_rng(0xFEEEFEEE)
  
      root = tmp_path / "open_images"
  
      def write_folder_and_flist(base_dir: Path, subfolder: str):
          directory = base_dir / subfolder
          directory.mkdir(parents=True)
  
          n = rng.integers(1, 16)
  
          images = []
  
          # NOTE: update this if we switch to arbitrary split paths
          with open(base_dir / f"list-{subfolder}-files.txt", "w") as f:
              for index in range(n):
                  path = directory.joinpath(f"{index:03}.jpg")
  
                  images.append(
                      create_deterministic_image((3, 224, 224), index)
                  )
                  write_image_to_file(images[-1], path)
                  f.write(f"{path.name}\n")
  
              return images
  
      train_images = write_folder_and_flist(root, "train")
      val_images = write_folder_and_flist(root, "validation")
      test_images = write_folder_and_flist(root, "test")
  
      return root, [train_images, val_images, test_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 1 for calling a global function with example usage: open_images_datafolder(tmp_path) and returns: root,  list, images