<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _handle_log_rotations(self):
        ''' Rotate each handler's log file if necessary '''
        for h in self.capture_handlers:
            if self._should_rotate_log(h):
                self._rotate_log(h)