#NEWLINE# def encode_multipart( values , boundary = None , charset = 'utf-8' ) : #NEWLINE# #INDENT# 'Like `stream_encode_multipart` but returns a tuple in the form\n    (``boundary``, ``data``) where data is a bytestring.\n    ' #NEWLINE# ( stream , length , boundary ) = stream_encode_multipart ( values , use_tempfile = False , boundary = boundary , charset = stream ) #NEWLINE# return ( boundary , stream . read ( ) )