class_docstr: A report written as HTML.
  
  Methods such as ``save_as_html``, or ``open_in_browser``
  are inherited from class ``nilearn.plotting.html_document.HTMLDocument``.
class_docstr_tok: ["A","report","written","as","HTML",".","Methods","such","as","``","save_as_html","``",",","or","``","open_in_browser","``","are","inherited","from","class","``","nilearn.plotting.html_document.HTMLDocument","``","."]
docstr: Construct the ``HTMLReport`` class.
  
  Parameters
  ----------
  head_tpl : Template
      This is meant for display as a full page, eg writing on disk.
      This is the Template object used to generate the HTML head
      section of the report. The template should be filled with:
  
          - title: The title of the HTML page.
          - body: The full body of the HTML page. Provided through
            the ``body`` input.
  
  body : :obj:`str`
      This parameter is used for embedding in the provided
      ``head_tpl`` template. It contains the full body of the
      HTML page.
  
  head_values : :obj:`dict`, default={}
      Additional substitutions in ``head_tpl``.
  
      .. note::
          This can be used to provide additional values
          with custom templates.
docstr_tok: ["Construct","the","``","HTMLReport","``","class",".","Parameters","--","--","--","--","--","head_tpl",":","Template","This","is","meant","for","display","as","a","full","page",",","eg","writing","on","disk",".","This","is","the","Template","object","used","to","generate","the","HTML","head","section","of","the","report",".","The","template","should","be","filled","with",":","-","title",":","The","title","of","the","HTML","page",".","-","body",":","The","full","body","of","the","HTML","page",".","Provided","through","the","``","body","``","input",".","body",":",":","obj",":","`","str","`","This","parameter","is","used","for","embedding","in","the","provided","``","head_tpl","``","template",".","It","contains","the","full","body","of","the","HTML","page",".","head_values",":",":","obj",":","`","dict","`",",","default=","{","}","Additional","substitutions","in","``","head_tpl","``",".","..","note",":",":","This","can","be","used","to","provide","additional","values","with","custom","templates","."]
code: def __init__(self, head_tpl, body, head_values={}):
      """Construct the ``HTMLReport`` class.
  
      Parameters
      ----------
      head_tpl : Template
          This is meant for display as a full page, eg writing on disk.
          This is the Template object used to generate the HTML head
          section of the report. The template should be filled with:
  
              - title: The title of the HTML page.
              - body: The full body of the HTML page. Provided through
                the ``body`` input.
  
      body : :obj:`str`
          This parameter is used for embedding in the provided
          ``head_tpl`` template. It contains the full body of the
          HTML page.
  
      head_values : :obj:`dict`, default={}
          Additional substitutions in ``head_tpl``.
  
          .. note::
              This can be used to provide additional values
              with custom templates.
  
      """
      html = head_tpl.safe_substitute(body=body, **head_values)
      super().__init__(html)
      self.head_tpl = head_tpl
      self.body = body
  
imports: import copy
  import os
  import warnings
  from pathlib import Path
  from string import Template
  from nilearn.externals import tempita
  from nilearn.plotting.html_document import HTMLDocument
  from nilearn.reporting.utils import figure_to_svg_base64
label_desc: Use image node_id 1 to create a new HTMLReport object from inherited base classes: HTMLDocument with example: obj = HTMLReport(head_tpl, body, head_values)