code: def _full_brain_info(
      volume_img,
      mesh="fsaverage5",
      threshold=None,
      cmap=cm.cold_hot,
      black_bg=False,
      symmetric_cmap=True,
      bg_on_data=False,
      darkness=0.7,
      vmax=None,
      vmin=None,
      vol_to_surf_kwargs={},
  ):
      """Project 3D map on cortex; prepare info to plot both hemispheres.
  
      This computes the dictionary that gets inserted in the web page,
      which contains encoded meshes, colors, min and max values, and
      background color.
  
      """
      info = {}
      mesh = surface.surface.check_mesh(mesh)
      surface_maps = {
          h: surface.vol_to_surf(
              volume_img,
              mesh[f"pial_{h}"],
              inner_mesh=mesh.get(f"white_{h}", None),
              **vol_to_surf_kwargs,
          )
          for h in ["left", "right"]
      }
      colors = colorscale(
          cmap,
          np.asarray(list(surface_maps.values())).ravel(),
          threshold,
          symmetric_cmap=symmetric_cmap,
          vmax=vmax,
          vmin=vmin,
      )
  
      for hemi, surf_map in surface_maps.items():
          curv_map = surface.load_surf_data(mesh[f"curv_{hemi}"])
          bg_map = np.sign(curv_map)
  
          info[f"pial_{hemi}"] = mesh_to_plotly(mesh[f"pial_{hemi}"])
          info[f"inflated_{hemi}"] = mesh_to_plotly(
              mesh[f"infl_{hemi}"]
          )
  
          info[f"vertexcolor_{hemi}"] = get_vertexcolor(
              surf_map,
              colors["cmap"],
              colors["norm"],
              absolute_threshold=colors["abs_threshold"],
              bg_map=bg_map,
              bg_on_data=bg_on_data,
              darkness=darkness,
          )
      info["cmin"], info["cmax"] = float(colors["vmin"]), float(
          colors["vmax"]
      )
      info["black_bg"] = black_bg
      info["full_brain_mesh"] = True
      info["colorscale"] = colors["colors"]
      return info
  
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 5 for calling a global function with example usage: _full_brain_info(volume_img, mesh, threshold, cmap, black_bg, symmetric_cmap, bg_on_data, darkness, vmax, vmin, vol_to_surf_kwargs) and returns: info