#NEWLINE# def search( self , first , query ) : #NEWLINE# #INDENT# ' args:\n             first: None\n             query: string with mailbox query (flags, date, uid, id, ...)\n                example: \'2:15723 BEFORE 27-Jan-2014 FROM "gumby"\'\n        result[1][0] -> "id_1 id_2 ... id_n"\n        ' #NEWLINE# messages = self . _get_messages ( query ) #NEWLINE# ids = ' ' . join ( [ str ( item [ 'id' ] ) for item in first ] ) #NEWLINE# return ( 'OK' , ( ids , None ) )