def __build_author_name_expr(author_name, author_email_address):
    """
    Build the name of the author of a message as described in the Internet
    Message Format specification: https://tools.ietf.org/html/rfc5322#section-3.6.2


    :param author_name: complete name of the originator of the message.

    :param author_email_address: address of the mailbox to which the author
        of the message suggests that replies be sent.


    :return: a string representing the author of the message, that is, the
        mailbox of the person or system responsible for the writing of the
        message.  This string is intended to be used as the "From:" field
        of the message.
    """
    assert author_name is not None or author_email_address is not None, 'Both arguments MUST NOT be bull'
    author_name_expr = author_name or author_email_address[:
        author_email_address.find('@')]
    if ' ' in author_name_expr:
        author_name_expr = f'"{author_name_expr}"'
    if author_email_address:
        author_name_expr = f'{author_name_expr} <{author_email_address}>'
    return author_name_expr
