#NEWLINE# def as_reasonable_unit( self ) : #NEWLINE# #INDENT# '\n        Returns the delivery time as reasonable unit based on the max hours.\n\n        This is used to show the delivery time to the shop customer.\n        ' #NEWLINE# delivery_time = self . as_hours ( ) #NEWLINE# if ( delivery_time . max > 1440 ) : #NEWLINE# #INDENT# return delivery_time . as_months ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . max > 168 ) : #NEWLINE# #INDENT# return delivery_time . as_weeks ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( delivery_time . max > 48 ) : #NEWLINE# #INDENT# return delivery_time . as_days ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return delivery_time