code: def __parse_imap_search_result(self, result):
          
          if isinstance(result, types.ListType):
              # Above is same as "type(result) == types.ListType"
              if len(result) == 1:
                  return self.__parse_imap_search_result(result[0])
              else:
                  return result
          elif isinstance(result, types.StringType):
              # Above is same as "type(result) == types.StringType"
              return result.split()
          else:
              # Fail silently assuming tests will fail if emails are not found
              return []
docs: 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