def METHOD_NAME(self, subject: Subject) -> Subject:
    source_shape = np.array(subject.spatial_shape, np.uint16)
    function: Callable = np.floor if self.method == 'crop' else np.ceil  # type: ignore[assignment]  # noqa: B950
    integer_ratio = function(source_shape / self.target_multiple)
    target_shape = integer_ratio * self.target_multiple
    target_shape = np.maximum(target_shape, 1)
    transform = CropOrPad(target_shape.astype(int))
    subject = transform(subject)  # type: ignore[assignment]
    return subject