code: def test_json_view_params(affine_eye):
      # Try to generate some sprite parameters
      params = html_stat_map._json_view_params(
          shape=[4, 4, 4],
          affine=affine_eye,
          vmin=0,
          vmax=1,
          cut_slices=[1, 1, 1],
          black_bg=True,
          opacity=0.5,
          draw_cross=False,
          annotate=True,
          title="A test",
          colorbar=True,
          value=True,
      )
  
      # Just check that a structure was generated,
      # and test a single parameter
      assert params["overlay"]["opacity"] == 0.5
  
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 12 for calling a global function with example usage: test_json_view_params(affine_eye) without return types