code: def test_resampling_warning_binary_image(affine_eye, rng):
      # Resampling a binary image with continuous or
      # linear interpolation should raise a warning.
      data_binary = rng.integers(4, size=(1, 4, 4), dtype="int32")
      data_binary[data_binary > 0] = 1
  
      assert sorted(list(np.unique(data_binary))) == [0, 1]
  
      rot = rotation(0, np.pi / 4)
      img_binary = Nifti1Image(data_binary, affine_eye)
  
      assert _utils.niimg.is_binary_niimg(img_binary)
  
      with pytest.warns(Warning, match="Resampling binary images with"):
          resample_img(
              img_binary, target_affine=rot, interpolation="continuous"
          )
  
      with pytest.warns(Warning, match="Resampling binary images with"):
          resample_img(
              img_binary, target_affine=rot, interpolation="linear"
          )
  
imports: import copy
  import math
  import os
  from pathlib import Path
  import numpy
  import pytest
  from nibabel import Nifti1Header, Nifti1Image
  from nibabel.freesurfer import MGHImage
  from numpy.testing import assert_allclose, assert_almost_equal, assert_array_almost_equal, assert_array_equal, assert_equal
  from nilearn import _utils
  from nilearn._utils import testing
  from nilearn.conftest import _affine_eye, _rng
  from nilearn.image import get_data
  from nilearn.image.image import _pad_array, crop_img
  from nilearn.image.resampling import BoundingBoxError, coord_transform, from_matrix_vector, get_bounds, reorder_img, resample_img, resample_to_img
label_desc: Use image node_id 14 for calling a global function with example usage: test_resampling_warning_binary_image(affine_eye, rng) without return types