def format_time(self, time, function, yes, no):
        """Formats the specified time using function. If time is not None,
        the value 'yes' is used, otherwise 'no'.
        """
        if time is not None:
            return function(time.strftime(yes))
        else:
            return function(no)
def format_time ( self , time , function , yes , no ) : if time is not None : return function ( time . strftime ( yes ) ) else : return function ( no )
Formats the specified time using function. If time is not None,
        the value 'yes' is used, otherwise 'no'.