code: def test_json_view_to_html(affine_eye, black_bg, cbar):
      data, json_view = _get_data_and_json_view(black_bg, cbar)
      json_view["params"] = html_stat_map._json_view_params(
          data.shape,
          affine_eye,
          vmin=0,
          vmax=1,
          cut_slices=[1, 1, 1],
          black_bg=True,
          opacity=1,
          draw_cross=True,
          annotate=False,
          title="test",
          colorbar=True,
      )
  
      # Create a viewer
      html_view = html_stat_map._json_view_to_html(json_view)
      _check_html(html_view)
  
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 16 for calling a global function with example usage: test_json_view_to_html(affine_eye, black_bg, cbar) without return types