code: def test_resample_stat_map(affine_eye):
      # Start with simple simulated data
      bg_img, data = _simulate_img()
  
      # Now double the voxel size and mess with the affine
      affine = 2 * affine_eye
      affine[3, 3] = 1
      affine[0, 1] = 0.1
      stat_map_img = Nifti1Image(data, affine)
  
      # Make a mask for the stat image
      mask_img = new_img_like(
          stat_map_img, data > 0, stat_map_img.affine
      )
  
      # Now run the resampling
      stat_map_img, mask_img = html_stat_map._resample_stat_map(
          stat_map_img,
          bg_img,
          mask_img,
          resampling_interpolation="nearest",
      )
  
      # Check positive isotropic, near-diagonal affine
      _check_affine(stat_map_img.affine)
      _check_affine(mask_img.affine)
  
      # Check voxel size matches bg_img
      assert (
          stat_map_img.affine[0, 0] == bg_img.affine[0, 0]
      ), "stat_map_img was not resampled at the resolution of background"
      assert (
          mask_img.affine[0, 0] == bg_img.affine[0, 0]
      ), "mask_img was not resampled at the resolution of background"
  
imports: import base64
  import warnings
  from io import BytesIO
  import numpy
  import pytest
  from matplotlib import pyplot
  from nibabel import Nifti1Image
  from nilearn import datasets, image
  from nilearn.image import get_data, new_img_like
  from nilearn.plotting import html_stat_map
  from ..js_plotting_utils import colorscale
label_desc: Use image node_id 11 for calling a global function with example usage: test_resample_stat_map(affine_eye) without return types