<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def exit_handler(signum, frame):
 """ Catch SIGTERM and SIGHUP and call "sys.exit" which raises "SystemExit" exception. This will trigger all the cleanup code defined in ContextManagers and "finally" statements. For more details about the arguments see "signal" documentation. Args: signum(int):
 The signal's number frame(frame):
 The current stack frame, can be None """


    LOGGER.debug('signal {} was caught'.format(signum))
    sys.exit(128 + signum)