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

def sigterm(self) -> None:
        '''Handle SIGTERM from the system by stopping tasks gracefully.
        Repeated signals will be ignored while waiting for tasks to finish.'''

        if self.stop_attempts < 1:
            Log.info('received SIGTERM, gracefully stopping tasks')
            self.stop_attempts += 1
            self.terminate()

        else:
            Log.info('received SIGTERM, bravely waiting for tasks')