code: def __init__(
      self,
      path: str,
      split: str = "train",
      splits: tuple[float, float, float] = (0.95, 0.04, 0.01),
      min_resize_res: int = 256,
      max_resize_res: int = 256,
      crop_res: int = 256,
      flip_prob: float = 0.0,
  ):
      assert split in ("train", "val", "test")
      assert sum(splits) == 1
      self.path = path
      self.min_resize_res = min_resize_res
      self.max_resize_res = max_resize_res
      self.crop_res = crop_res
      self.flip_prob = flip_prob
  
      with open(Path(self.path, "seeds.json")) as f:
          self.seeds = json.load(f)
  
      split_0, split_1 = {
          "train": (0.0, splits[0]),
          "val": (splits[0], splits[0] + splits[1]),
          "test": (splits[0] + splits[1], 1.0),
      }[split]
  
      idx_0 = math.floor(split_0 * len(self.seeds))
      idx_1 = math.floor(split_1 * len(self.seeds))
      self.seeds = self.seeds[idx_0:idx_1]
  
file_path: NeMo/nemo/collections/multimodal/data/instruct_pix2pix/edit_dataset.py
imports: from __future__ import annotations
  import json
  import math
  from pathlib import Path
  from typing import Any
  import numpy
  import torch
  from einops import rearrange
  from PIL import Image
  from torch.utils.data import Dataset
label_desc: Use image node_id 1 to create a new EditDataset object from inherited base classes: Dataset with example: obj = EditDataset(path, split, splits, min_resize_res, max_resize_res, crop_res, flip_prob)