code: def test_transform_images(self, transform):
      dataset = ray.data.from_items(
          [
              {"image": np.zeros((32, 32, 3)), "label": 0},
              {"image": np.zeros((32, 32, 3)), "label": 1},
          ]
      )
      preprocessor = TorchVisionPreprocessor(
          columns=["image"], transform=transform
      )
  
      transformed_dataset = preprocessor.transform(dataset)
  
      assert transformed_dataset.schema().names == ["image", "label"]
      transformed_images = [
          record["image"] for record in transformed_dataset.take_all()
      ]
      assert all(
          image.shape == (3, 32, 32) for image in transformed_images
      )
      assert all(
          image.dtype == np.double for image in transformed_images
      )
      labels = {
          record["label"] for record in transformed_dataset.take_all()
      }
      assert labels == {0, 1}
  
file_path: ray/python/ray/data/tests/preprocessors/test_torch.py
imports: import numpy
  import pytest
  import torch
  from torchvision import transforms
  import ray
  from ray.data.preprocessors import TorchVisionPreprocessor
label_desc: Use image node_id 2 for calling the TestTorchVisionPreprocessor obj's underlying member method code with example usage: obj.test_transform_images(transform) without return types