def parse_docstring(self, func_or_method: typing.Callable) -> dict:
docstring = func_or_method.__doc__<EOL>if not docstring:<EOL><INDENT>return {}<EOL><DEDENT>docstring = docstring.split("<STR_LIT>")[-<NUM_LIT:1>]<EOL>parsed = yaml.safe_load(docstring)<EOL>if not isinstance(parsed, dict):<EOL><INDENT>return {}<EOL><DEDENT>return parsed<EOL>
Given a function, parse the docstring as YAML and return a dictionary of info.