def METHOD_NAME():
    """Check the output zooms and data."""
    img_shape = (193, 229, 193)  # Size from MNI152NLin2009cAsym, res=1
    img_affine = nb.affines.from_matvec(np.eye(3), (-96, -132, -78))
    data = np.random.normal(size=img_shape).astype(float)
    new_affine = nb.affines.from_matvec(2.0 * np.eye(3), (-96.5, -132.5, -78.5))
    nii = nb.Nifti1Image(data, img_affine, None)
    nii.set_qform(img_affine, code=4)
    resampled = resample_by_spacing(nii, (2.0, 2.0, 2.0), order=1, clip=False)
    assert resampled.header.get_zooms()[:3] == (2.0, 2.0, 2.0)
    assert np.all(resampled.affine == new_affine)
    # Create a rotation matrix
    rot = nb.affines.from_matvec(nb.eulerangles.euler2mat(0.01, 0.02, 0.004))
    # Check this works with oblique images
    nii = nb.Nifti1Image(data, rot.dot(img_affine), None)
    nii.set_qform(img_affine, code=4)
    nii.set_sform(rot.dot(img_affine), code=4)
    resampled = resample_by_spacing(nii, (2.0, 2.0, 2.0), order=1, clip=False)
    assert resampled.header.get_zooms()[:3] == (2.0, 2.0, 2.0)
    assert np.allclose(resampled.affine, rot.dot(new_affine))