def retrieve_commands(obj):
commands = {}  <EOL>for func in obj.__dict__:<EOL><INDENT>if not inspect.isfunction(obj.__dict__[func]) andnot isinstance(obj.__dict__[func], property):<EOL><INDENT>continue<EOL><DEDENT>if func.startswith('<STR_LIT:_>'):<EOL><INDENT>continue<EOL><DEDENT>commands[func] = _get_first_sentence_in_pydoc(<EOL>obj.__dict__[func])<EOL><DEDENT>return commands<EOL>
Retrieve all commands and help texts from an API object.