code: def test_affine_transformation(self):
      data_rdd = self.sc.parallelize([self.sample])
      image_set = DistributedImageSet(image_rdd=data_rdd)
      crop = CenterCrop3D(5, 40, 40)
      cropped = image_set.transform(crop)
      affine = AffineTransform3D(np.random.rand(3, 3))
      transformed = cropped.transform(affine)
      image = transformed.get_image(key="imageTensor").first()
      assert image.shape == (5, 40, 40, 1)
  
file_path: analytics-zoo/pyzoo/test/zoo/feature/image3d/test_image3d.py
imports: import pytest
  import h5py
  from math import pi
  from zoo.common.nncontext import *
  from zoo.feature.common import *
  from zoo.feature.image3d.transformation import *
label_desc: Use image node_id 8 for calling the Test_Image3D obj's underlying member method code with example usage: obj.test_affine_transformation() without return types