for 'invalid_date' and return value of the function _ called with an string 'Enter a valid time.', for 'invalid_time. define the method __init__ with 3 arguments: self, input_date_formats set to None, input_time_formats set to None,
def __init__ ( self , input_date_formats = None , input_time_formats = None , * args , ** kwargs ) :