<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_attempt(self):
 """Add an attempt when a object is a non-ok state :return: None """

        self.attempt += 1
        self.attempt = min(self.attempt, self.max_check_attempts)