code: def _define_overlay(estimator):
      """Determine whether an overlay was provided and \
      update the report text as appropriate."""
      displays = estimator._reporting()
  
      if len(displays) == 1:  # set overlay to None
          overlay, image = None, displays[0]
  
      elif len(displays) == 2:
          overlay, image = displays[0], displays[1]
  
      else:
          overlay, image = None, displays
  
      return overlay, image
  
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 5 for calling a global function with example usage: _define_overlay(estimator) and returns: overlay,  image