def METHOD_NAME(signum, frame):
    """Exit gracefully on terminate."""
    global _handled_term
    if not _handled_term:
        _handled_term = True
        if not _env_var_true("_REZ_QUIET_ON_SIG"):
            print("Terminated by user", file=sys.stderr)
        sigbase_handler(signum, frame)