code: def read_image_tensor(
      filepath: Path, transform=None, mode: str = "RGB"
  ) -> torch.Tensor:
      if transform is not None:
          image = transform(read_image(filepath, mode))
      else:
          image = read_image(filepath, mode)
      return image2tensor(image)
  
imports: from typing import Callable, Dict
  import torch
  from torch.utils.data import Dataset
  import torchvision.transforms.functional
  from torchvision import transforms
  import pytorch_lightning
  from collections.abc import Iterable
  from pathlib import Path
  from PIL import Image
  from typing import Tuple
label_desc: Use image node_id 3 for calling a global function with example usage: read_image_tensor(filepath, transform, mode) and returns: image2tensor