def METHOD_NAME(ds001419_data, tmp_path_factory):
    """Test xcp_d.interfaces.nilearn.ResampleToImage."""
    tmpdir = tmp_path_factory.mktemp("test_nilearn_meanimage")
    source_file = ds001419_data["boldref_t1w"]
    target_file = ds001419_data["t1w"]
    target_img = nb.load(target_file)
    source_img = nb.load(source_file)
    assert not np.array_equal(target_img.header.get_zooms(), source_img.header.get_zooms())
    interface = nilearn.ResampleToImage(
        in_file=source_file,
        target_file=target_file,
        out_file="resampled.nii.gz",
    )
    results = interface.run(cwd=tmpdir)
    assert os.path.isfile(results.outputs.out_file)
    out_img = nb.load(results.outputs.out_file)
    assert out_img.ndim == 3
    assert np.array_equal(target_img.affine, out_img.affine)
    assert np.array_equal(target_img.header.get_zooms(), out_img.header.get_zooms())