docstr: Parse docstring (parsed with getdoc) according to Google-style
  formatting and convert to markdown. We support the following
  Google style syntax:
  
  Args, Kwargs:
      argname (type): text
      freeform text
  Returns, Yields:
      retname (type): text
      freeform text
  Raises:
      exceptiontype: text
      freeform text
  Notes, Examples:
      freeform text
docstr_tok: ["Parse","docstring","(","parsed","with","getdoc",")","according","to","Google-style","formatting","and","convert","to","markdown",".","We","support","the","following","Google","style","syntax",":","Args",",","Kwargs",":","argname","(","type",")",":","text","freeform","text","Returns",",","Yields",":","retname","(","type",")",":","text","freeform","text","Raises",":","exceptiontype",":","text","freeform","text","Notes",",","Examples",":","freeform","text"]
code: def doc2md(self, func):
      """Parse docstring (parsed with getdoc) according to Google-style
      formatting and convert to markdown. We support the following
      Google style syntax:
  
      Args, Kwargs:
          argname (type): text
          freeform text
      Returns, Yields:
          retname (type): text
          freeform text
      Raises:
          exceptiontype: text
          freeform text
      Notes, Examples:
          freeform text
  
      """
      # The specfication of Inspect#getdoc() was changed since version 3.5,
      # the documentation strings are now inherited if not overridden.
      # For details see: https://docs.python.org/3.6/library/inspect.html#inspect.getdoc
      doc = "" if func.__doc__ is None else getdoc(func) or ""
      blockindent = 0
      argindent = 1
      out = []
  
      for line in doc.split("\n"):
          indent = len(line) - len(line.lstrip())
          line = line.lstrip()
          if _RE_BLOCKSTART.match(line):
              # start of a new block
              blockindent = indent
              out.append("\n*{}*\n".format(line))
          elif indent > blockindent:
              if _RE_ARGSTART.match(line):
                  # start of new argument
                  out.append(
                      "\n"
                      + " " * blockindent
                      + " - "
                      + _RE_ARGSTART.sub(r"**\1** (\2): \3", line)
                  )
                  argindent = indent
              elif _RE_EXCSTART.match(line):
                  # start of an exception-type block
                  out.append(
                      "\n"
                      + " " * blockindent
                      + " - "
                      + _RE_EXCSTART.sub(r"**\1**: \2", line)
                  )
                  argindent = indent
              elif indent > argindent:
                  out.append("\n" + " " * (blockindent + 2) + line)
              else:
                  out.append("\n" + line)
          else:
              out.append("\n" + line)
  
      return "".join(out)
  
file_path: keras-vis/docs/md_autogen.py
imports: import os
  import re
  import inspect
  from inspect import getdoc, getargspec, getsourcefile, getsourcelines, getmembers
  from collections import defaultdict
  import sys
label_desc: Use image node_id 4 for calling the MarkdownAPIGenerator obj's underlying member method code with example usage: obj.doc2md(func) and returns: str