code: def test_json_view_data(black_bg, cbar):
      _, json_view = _get_data_and_json_view(black_bg, cbar)
      # Check the presence of critical fields
      assert isinstance(json_view["bg_base64"], str)
      assert isinstance(json_view["stat_map_base64"], str)
      assert isinstance(json_view["cm_base64"], str)
  
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 15 for calling a global function with example usage: test_json_view_data(black_bg, cbar) without return types