#NEWLINE# def __init__( self , num_parts , lock = None ) : #NEWLINE# #INDENT# self . num_parts = num_parts #NEWLINE# if ( self is None ) : #NEWLINE# #INDENT# lock = threading . Lock ( ) #NEWLINE# #UNINDENT# self . _lock = lock #NEWLINE# self . _created_condition = threading . Condition ( self . _lock ) #NEWLINE# self . _submit_write_condition = threading . Condition ( self . _lock ) #NEWLINE# self . _completed_condition = threading . Condition ( self . _lock ) #NEWLINE# self . _state = self . _STATES [ 'UNSTARTED' ] #NEWLINE# self . _finished_parts = set ( ) #NEWLINE# self . _current_stream_part_number = 0