def message_to_objects(<EOL>message: str, sender: str, sender_key_fetcher:Callable[[str], str]=None, user: UserType =None,<EOL>) -> List:
doc = etree.fromstring(message)<EOL>if doc.tag in TAGS:<EOL><INDENT>return element_to_objects(doc, sender, sender_key_fetcher, user)<EOL><DEDENT>return []<EOL>
Takes in a message extracted by a protocol and maps it to entities.

    :param message: XML payload
    :type message: str
    :param sender: Payload sender id
    :type message: str
    :param sender_key_fetcher: Function to fetch sender public key. If not given, key will always be fetched
        over network. The function should take sender handle as the only parameter.
    :param user: Optional receiving user object. If given, should have a `handle`.
    :returns: list of entities