def METHOD_NAME(signum, frame):
    log.info("Received signal %s, dumping thread stacks", signum)
    thread_names = {t.ident: t.name for t in threading.enumerate()}
    for thread_ident, frame in list(sys._current_frames().items()):
        log.info("Thread ident=0x%x name=%s", thread_ident, thread_names.get(thread_ident, "unknown"))
        log.info("".join(traceback.format_stack(frame)))