def get_transform(self, image):
    spatial_shape = image.shape[(- 2):]
    out = self._get_params(spatial_shape)
    if all(((x is None) for x in out)):
        return NoOpTransform()
    (angle, translate, scale, shear) = out
    return AffineTransform(angle=angle, translate=translate, scale=scale, shear=shear)
def get_transform(self, image):
    spatial_shape = image.shape[(- 2):]
    out = self._get_params(spatial_shape)
    if all(((x is None) for x in out)):
        return NoOpTransform()
    (angle, translate, scale, shear) = out
    return AffineTransform(angle=angle, translate=translate, scale=scale, shear=shear)