code: def files_to_torch(
      root: Path,
      resize: int = None,
      crop: int = None,
      mean: List = None,
      std: List = None,
  ) -> Dataset:
      """Load image files into pytorch dataset."""
      # Set up transform for loading and converting files.
      transform = create_transform(
          resize=resize, crop=crop, mean=mean, std=std
      )
  
      # Load images from folder.
      dataset = datasets.ImageFolder(root, transform=transform)
      return dataset
  
imports: import numpy
  import torch
  from torch.utils.data import Dataset
  from torchvision import datasets, transforms
  from typing import List, Union
  from pathlib import Path
  from PIL import Image
label_desc: Use image node_id 10 for calling a global function with example usage: files_to_torch(root, resize, crop, mean, std) and returns: dataset