class_docstr: Open Images V6 data loader
  
  This is a minimalist dataloader for Open Images V6. Since Open Images puts
  all data into a single folder, it is expected that the user has already
  created a text file with all the images of the split prior to instantiating
  this class (otherwise an ``os.walk`` takes forever). The train file should
  be called 'list_train_files.txt' by default, for example.
  
  If the user gives a different name to the image list file, the new filename
  can be specified in the ``__init__`` function.
  
  Args:
      root: Root direcotry for Open Images V6.
      split: Which split of the dataset (one of 'train', 'val', or 'test').
          This is used to indicate the subfolder of ``root`` where the images
          are stored, except for the case of 'val', which is renamed to
          'validation'
      image_list_file: The file containing all image names under the split.
          By default, it assumes the file has the name
          'list-{split}-files.txt'.
      transform: A torchvision PIL transform.
code: def __init__(
      self,
      root: Union[str, Path],
      split: str,
      image_list_file: Optional[Union[str, Path]] = None,
      transform: Optional[Callable] = None,
  ) -> None:
      super().__init__()
      if split not in ("train", "val", "test"):
          raise ValueError("Split must be in ('train', 'val', 'test')")
  
      self.root = Path(root)
      self.split = self.split_map[split]
      self.transform = transform
  
      if image_list_file is None:
          self.image_list_file = (
              self.root / f"list-{self.split}-files.txt"
          )
      else:
          self.image_list_file = Path(image_list_file)
  
      self.indices = _load_indices(self.image_list_file, split=split)
  
file_path: NeuralCompression/neuralcompression/data/_openimages_v6.py
imports: import os
  from pathlib import Path
  from typing import Callable, List, Optional, Union
  from torch.utils.data import Dataset
  from torchvision.datasets.folder import default_loader
label_desc: Use image node_id 1 to create a new OpenImagesV6 object from inherited base classes: Dataset with example: obj = OpenImagesV6(root, split, image_list_file, transform)