def __parse_imap_search_result(self, result):
if isinstance(result, types.ListType):<EOL><INDENT>if len(result) == <NUM_LIT:1>:<EOL><INDENT>return self.__parse_imap_search_result(result[<NUM_LIT:0>])<EOL><DEDENT>else:<EOL><INDENT>return result<EOL><DEDENT><DEDENT>elif isinstance(result, types.StringType):<EOL><INDENT>return result.split()<EOL><DEDENT>else:<EOL><INDENT>return []<EOL><DEDENT>
This takes the result of imap_search and returns SANE results
@Params
result - result from an imap_search call
@Returns
List of IMAP search results