<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_stop(self, iters, elapsed_time, converged):
 """ Defines the stopping criterion. """


        r_c = self.config['resources']
        
        stop = False
        if converged==0:
            stop=True
        if r_c['maximum-iterations'] !='NA' and iters>= r_c['maximum-iterations']:
            stop = True
        if r_c['max-run-time'] != 'NA' and elapsed_time/60.>= r_c['max-run-time']:
            stop = True
        return stop