code: def help_for_command(command):
      
      help_text = pydoc.text.document(command)
      # remove backspaces
      return re.subn('.\\x08', '', help_text)[0]
docs: Get the help text (signature + docstring) for a command (function).