def doc2md(self, func):
doc = getdoc(func) or "<STR_LIT>"<EOL>blockindent = <NUM_LIT:0><EOL>argindent = <NUM_LIT:1><EOL>out = []<EOL>for line in doc.split("<STR_LIT:\n>"):<EOL><INDENT>indent = len(line) - len(line.lstrip())<EOL>line = line.lstrip()<EOL>if _RE_BLOCKSTART.match(line):<EOL><INDENT>blockindent = indent<EOL>out.append("<STR_LIT>".format(line))<EOL><DEDENT>elif indent > blockindent:<EOL><INDENT>if _RE_ARGSTART.match(line):<EOL><INDENT>out.append("<STR_LIT:\n>" + "<STR_LIT:U+0020>" * blockindent + "<STR_LIT>" + _RE_ARGSTART.sub(r"<STR_LIT>", line))<EOL>argindent = indent<EOL><DEDENT>elif _RE_EXCSTART.match(line):<EOL><INDENT>out.append("<STR_LIT:\n>" + "<STR_LIT:U+0020>" * blockindent + "<STR_LIT>" + _RE_EXCSTART.sub(r"<STR_LIT>", line))<EOL>argindent = indent<EOL><DEDENT>elif indent > argindent:<EOL><INDENT>out.append("<STR_LIT:\n>" + "<STR_LIT:U+0020>" * (blockindent + <NUM_LIT:2>) + line)<EOL><DEDENT>else:<EOL><INDENT>out.append("<STR_LIT:\n>" + line)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>out.append("<STR_LIT:\n>" + line)<EOL><DEDENT><DEDENT>return "<STR_LIT>".join(out)<EOL>
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