code: def _check_html(html_view, title=None):
      """Check the presence of some expected code in the html viewer."""
      assert isinstance(html_view, html_stat_map.StatMapView)
      assert "var brain =" in str(html_view)
      assert "overlayImg" in str(html_view)
      if title is not None:
          assert f"<title>{title}</title>" in str(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 1 for calling a global function with example usage: _check_html(html_view, title) without return types