#NEWLINE# def __init__( self , min_periods = None , min_window = None , max_window = None , default_monthly_consumption_function = None , exclude_invalid_periods = False ) : #NEWLINE# #INDENT# def _default_if_none( value , default ) : #NEWLINE# #INDENT# return ( value if ( value is not None ) else default ) #NEWLINE# #UNINDENT# self . min_periods = _default_if_none ( min_periods , self . DEFAULT_MIN_PERIODS ) #NEWLINE# self . min_window = _default_if_none ( min_window , self . DEFAULT_MIN_WINDOW ) #NEWLINE# self . max_window = _default_if_none ( max_window , self . DEFAULT_MAX_WINDOW ) #NEWLINE# self . default_monthly_consumption_function = _default_if_none ( default_monthly_consumption_function , DEFAULT_CONSUMPTION_FUNCTION ) #NEWLINE# self . exclude_invalid_periods = exclude_invalid_periods