def message_from_string(s, *args, **kws):
 from email.parser import Parser
 return Parser(*args, **kws).parsestr(s)

def message_from_string ( s , * args , ** kws ) : from email . parser import Parser return Parser ( * args , ** kws ) . parsestr ( s )
parse a string into a message object model .