code: def _docformat(docstring, docdict=None, funcname=None):
      """Fill a function docstring from variables in dictionary.
  
      Adapt the indent of the inserted docs
  
      Parameters
      ----------
      docstring : string
          docstring from function, possibly with dict formatting strings
      docdict : dict, optional
          dictionary with keys that match the dict formatting strings
          and values that are docstring fragments to be inserted.  The
          indentation of the inserted docstrings is set to match the
          minimum indentation of the ``docstring`` by adding this
          indentation to all lines of the inserted string, except the
          first
  
      Returns
      -------
      outstring : string
          string with requested ``docdict`` strings inserted
      """
      if not docstring:
          return docstring
      if docdict is None:
          docdict = {}
      if not docdict:
          return docstring
      lines = docstring.expandtabs().splitlines()
      # Find the minimum indent of the main docstring, after first line
      if len(lines) < 2:
          icount = 0
      else:
          icount = _indentcount_lines(lines[1:])
      indent = " " * icount
      # Insert this indent to dictionary docstrings
      indented = {}
      for name, dstr in docdict.items():
          lines = dstr.expandtabs().splitlines()
          try:
              newlines = [lines[0]]
              for line in lines[1:]:
                  newlines.append(indent + line)
              indented[name] = "\n".join(newlines)
          except IndexError:
              indented[name] = dstr
      funcname = (
          docstring.split("\n")[0] if funcname is None else funcname
      )
      try:
          return docstring % indented
      except (TypeError, ValueError, KeyError) as exp:
          raise RuntimeError(
              "Error documenting %s:\n%s" % (funcname, str(exp))
          )
  
imports: import inspect
  import os
  import os.path
  import re
  import sys
  import webbrowser
  from copy import deepcopy
  from decorator import FunctionMaker
  from ..defaults import HEAD_SIZE_DEFAULT
  from ._bunch import BunchConst
label_desc: Use image node_id 9 for calling a global function with example usage: _docformat(docstring, docdict, funcname) and returns: docstring, docstring, unknown