#NEWLINE# def extract_body( message ) : #NEWLINE# #INDENT# plaintext_content = get_message_part_by_type ( message , 'text/plain' ) #NEWLINE# if plaintext_content : #NEWLINE# #INDENT# return plaintext_content #NEWLINE# #UNINDENT# html_content = get_message_part_by_type ( message , 'text/html' ) #NEWLINE# if html_content : #NEWLINE# #INDENT# return convert_html_to_markdown ( html_content ) #NEWLINE# #UNINDENT# raise ZulipEmailForwardError ( 'Unable to find plaintext or HTML message body' )