class_docstr: Abstract class for all datasets
code: def collate_fn(
      samples: List[Tuple[torch.Tensor, Any]]
  ) -> Tuple[torch.Tensor, List[Any]]:
      images, targets = zip(*samples)
      images = torch.stack(images, dim=0)
  
      return images, list(targets)
  
file_path: doctr/doctr/datasets/datasets/pytorch.py
imports: import os
  from copy import deepcopy
  from typing import Any, List, Tuple
  import numpy
  import torch
  from doctr.io import read_img_as_tensor, tensor_from_numpy
  from .base import _AbstractDataset, _VisionDataset
label_desc: Use image node_id 2 for calling the AbstractDataset obj's underlying member method code with example usage: obj.collate_fn(samples) and returns: images,  list