code: def to_numpy(
      data,
      resize: int = None,
      crop: int = None,
      mean: List = None,
      std: List = None,
  ) -> Union[List[np.ndarray], None]:
      """Convert data from any format to lists of numpy arrays [input, target]."""
      # Handle empty dataset.
      if data is None:
          return None
  
      # Recognize data format and convert accordingly.
      data_format = recognize_data_format(data)
      if data_format == "pytorch-dataset":
          # TODO: Maybe apply transformations here as well.
          return torch_to_numpy(data)
      elif data_format == "numpy":
          # TODO: Maybe apply transformations here as well.
          return data
      elif data_format == "files":
          return files_to_numpy(
              data, resize=resize, crop=crop, mean=mean, std=std
          )
      else:
          raise RuntimeError()
  
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 6 for calling a global function with example usage: to_numpy(data, resize, crop, mean, std) and returns: None, torch_to_numpy, data, files_to_numpy