human
Can you provide a the Python program you requested given the following:
Complete the below
def build_message_list(user_profile, messages):

    ''''Builds the message list object for the missed message email template.
    The messages are collapsed into per-recipient and per-sender blocks, like
    our web interface'
    '''
assistant
#Here is the Python program you requested.
    messages_to_render = []
    def sender_string(message):
        if (message.recipient.type in (Recipient.STREAM, Recipient.HUDDLE)):
            return message.sender.full_name
        else:
            return ''
    def relative_to_full_url(content):
        content = re.sub('/user_uploads/(\\S*)', (user_profile.realm.uri + '/user_uploads/\\1'), content)
        content = re.sub('<img    src=(\\S+)/user_uploads/(\\S+)>', '', content)
        content = re.sub('/static/generated/emoji/images/emoji/', (user_profile.realm.uri + '/static/generated/emoji/images/emoji/'), content)
        content = re.sub('/user_avatars/(\\d+)/emoji/', (user_profile.realm.uri + '/user_avatars/\\1/emoji/'), content)
        content = re.sub('/#narrow/stream/', (user_profile.realm.uri + '/#narrow/stream/'), content)
        return content
    def fix_plaintext_image_urls(content):
        return re.sub('\\[(\\S*)\\]\\((\\S*)\\)', '\\2', content)
    def fix_emoji_sizes(html):
        return html.replace('    class="emoji"', '    height="20px"')
    def build_message_payload(message):
        plain = message.content
        plain = fix_plaintext_image_urls(plain)
        plain = relative_to_full_url(plain)
        assert (message.rendered_content is not None)
        html = message.rendered_content
        html = relative_to_full_url(html)
        html = fix_emoji_sizes(html)
        return {'plain': plain, 'html': html}
    def build_sender_payload(message):
        sender = sender_string(message)
        return {'sender': sender, 'content': [build_message_payload(message)]}
    def message_header(user_profile, message):
        disp_recipient = get_display_recipient(message.recipient)
        if (message.recipient.type == Recipient.PERSONAL):
            header = (u'You    and    %s' % (message.sender.full_name,))
            html_link = pm_narrow_url(user_profile.realm, [message.sender.email])
            header_html = (u"<a    style='color:    #ffffff;'    href='%s'>%s</a>" % (html_link, header))
        elif...