code: def test_load_bg_img(affine_eye):
      # Generate simple simulated data with non-diagonal affine
      affine = affine_eye
      affine[0, 0] = -1
      affine[0, 1] = 0.1
      img, _ = _simulate_img(affine)
  
      # use empty bg_img
      bg_img, _, _, _ = html_stat_map._load_bg_img(img, bg_img=None)
      # Check positive isotropic, near-diagonal affine
      _check_affine(bg_img.affine)
  
      # Try to load the default background
      bg_img, _, _, _ = html_stat_map._load_bg_img(img)
  
      # Check positive isotropic, near-diagonal affine
      _check_affine(bg_img.affine)
  
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 9 for calling a global function with example usage: test_load_bg_img(affine_eye) without return types