<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def signal(sig, action):
 """ The point of this module and method is to decouple signal handlers from each other. Standard way to deal with handlers is to always store the old handler and call it. It creates a chain of handlers, making it impossible to later remove the handler. This method behaves like signal.signal() from standard python library. It always returns SIG_DFL indicating that the new handler is not supposed to call the old one. """

    assert callable(action), ("Second argument of signal() needs to be a "
                              "callable, got %r instead" % (action, ))
    global _handlers
    _install_handler(sig)

    if action in _handlers[sig]:
        log.debug('signal',
                  "Handler for signal %s already registered. %r", sig, action)
        return SIG_DFL
    _handlers[sig][1].append(action)
    return SIG_DFL