def METHOD_NAME(event):
    if event == 0:  # CTRL_C_EVENT
        action()
        # Typical C implementations would return 1 to indicate that
        # the event was processed and other control handlers in the
        # stack should not be executed.  However, that would
        # prevent the Python interpreter's handler from translating
        # CTRL-C to a `KeyboardInterrupt` exception, so we pretend
        # that we didn't handle it.
    return 0