code: def transform(self, X=None, y=None):
          
          # random draw in zoom range
          zoom_x = np.exp( random.gauss(
            np.log( self.zoom_range[0] ),
            np.log( self.zoom_range[1] ) ) )
          zoom_y = np.exp( random.gauss(
            np.log( self.zoom_range[0] ),
            np.log( self.zoom_range[1] ) ) )
          zoom_z = np.exp( random.gauss(
            np.log( self.zoom_range[0] ),
            np.log( self.zoom_range[1] ) ) )
          self.params = (zoom_x, zoom_y, zoom_z)
  
          tx = Zoom3D((zoom_x,zoom_y,zoom_z),
                      reference=self.reference,
                      lazy=self.lazy)
  
          return tx.transform(X,y)
docs: Transform an image using an Affine transform with
          zoom parameters randomly generated from the user-specified
          range.  Return the transform if X=None.
  
          Arguments
          ---------
          X : ANTsImage
              Image to transform
  
          y : ANTsImage (optional)
              Another image to transform
  
          Returns
          -------
          ANTsImage if y is None, else a tuple of ANTsImage types
  
          Examples
          --------
          >>> import ants
          >>> img = ants.image_read(ants.get_data('ch2'))
          >>> tx = ants.contrib.RandomZoom3D(zoom_range=(0.8,0.9))
          >>> img2 = tx.transform(img)