#NEWLINE# @ duration . setter #NEWLINE# def duration( self , value ) : #NEWLINE# #INDENT# if isinstance ( value , dict ) : #NEWLINE# #INDENT# value = timedelta ( ** value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( value , timedelta ) : #NEWLINE# #INDENT# value = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( value is not None ) : #NEWLINE# #INDENT# value = timedelta ( value ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if value : #NEWLINE# #INDENT# self . _end_time = None #NEWLINE# #UNINDENT# self . _duration = value