code: def _fill_html_template(info, embed_js=True):
      as_json = json.dumps(info)
      as_html = get_html_template(
          "surface_plot_template.html"
      ).safe_substitute(
          {
              "INSERT_STAT_MAP_JSON_HERE": as_json,
              "INSERT_PAGE_TITLE_HERE": info["title"] or "Surface plot",
          }
      )
      as_html = add_js_lib(as_html, embed_js=embed_js)
      return SurfaceView(as_html)
  
imports: import collections.abc
  import json
  from warnings import warn
  import matplotlib
  import matplotlib.pyplot
  import numpy
  from nilearn import datasets, surface
  from nilearn._utils import fill_doc
  from nilearn._utils.niimg_conversions import check_niimg_3d
  from nilearn.plotting import cm
  from nilearn.plotting.html_document import HTMLDocument
  from nilearn.plotting.js_plotting_utils import add_js_lib, colorscale, get_html_template, mesh_to_plotly, to_color_strings
label_desc: Use image node_id 7 for calling a global function with example usage: _fill_html_template(info, embed_js) and returns: SurfaceView