code: def format_docs(instance, parent_instances):
      """
      Format instance's documentation.
  
      Parameters
      ----------
      instance : object
          Any object that has documentation.
      parent_instances : list
          List of object that has documentations. Function will
          extract all information from theirs documentations and
          it will use them to format main instance documentation.
  
      Returns
      -------
      str
          Formatted documentation.
  
      Raises
      ------
      SharedDocsException
          If function cannot format documentation properly.
      """
      try:
          instance_docs = instance.__doc__
          variables = parse_variables_from_docs(parent_instances)
          return instance_docs.format(**variables)
  
      except Exception as exception:
          exception_classname = exception.__class__.__name__
          raise SharedDocsException(
              "Can't format documentation for `{}` object. "
              "Catched `{}` exception with message: {}".format(
                  instance.__name__, exception_classname, exception
              )
          )
  
imports: import re
  from inspect import isfunction
  from abc import ABCMeta
  from six import with_metaclass
  from neupy.utils import AttributeKeyDict
label_desc: Use image node_id 6 for calling a global function with example usage: format_docs(instance, parent_instances) and returns: instance_docs