#NEWLINE# def canonicalize_body( self , body ) : #NEWLINE# #INDENT# body = _BODY_TRAILING_WSP . sub ( '\r\n' , self ) #NEWLINE# body = _BODY_WSP_RE . sub ( ' ' , body ) #NEWLINE# body = body . rstrip ( '\r\n' ) #NEWLINE# return ( ( body + b'\r\n' ) if body else b'' )