from email.parser import Parser


def message_from_string(s, *args, **kws):
    """Parse a string into a Message object model.

    Optional _class and strict are passed to the Parser constructor.
    """
    return Parser(*args, **kws).parsestr(s)