class_docstr: Constructs cell dataset
class_docstr_tok: ["Constructs","cell","dataset"]
code: def __getitem__(self, idx):
      sample_dir = self.sample_dirs[idx]
      cell_fn = (sample_dir / "images" / sample_dir.name).with_suffix(
          ".png"
      )
      mask_fn = sample_dir / "mask.png"
  
      cell, mask = Image.open(cell_fn).convert("RGB"), Image.open(
          mask_fn
      )
      assert cell.size == mask.size
      return cell, mask
  
file_path: skorch/examples/nuclei_image_segmentation/dataset.py
imports: from itertools import zip_longest, product, chain
  import random
  import numpy
  import torch
  from torch.utils.data import Dataset
  from torchvision.transforms.functional import pad, to_tensor, normalize, hflip, vflip, crop
  from PIL import Image
label_desc: Use image node_id 3 for calling the CellsDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: cell,  mask