code: def test_load_image(tmp_path):
      data = create_dataset(
          grayscale=False, data_format="files", tmp_path=tmp_path
      )
  
      # Select a random image.
      image_path = next(data.rglob("*.png"))
  
      # torch
      img = load_image(image_path, resize=50, crop=40)
      assert isinstance(img, torch.Tensor)
      assert img.shape == (3, 40, 40)
  
      # numpy
      img = load_image(image_path, resize=50, crop=40, to_numpy=True)
      assert isinstance(img, np.ndarray)
      assert img.shape == (3, 40, 40)
  
file_path: traintool/tests/image_classification/test_preprocessing.py
imports: import comet_ml
  import pytest
  import numpy
  import torch
  from conftest import create_dataset, create_image
  from traintool.image_classification.preprocessing import recognize_data_format, torch_to_numpy, numpy_to_torch, files_to_numpy, files_to_torch, load_image, recognize_image_format, get_num_classes
label_desc: Use image node_id 13 for calling a global function with example usage: test_load_image(tmp_path) without return types