def METHOD_NAME(self, METHOD_NAME, *args, **kwds):
    """Registers an arbitrary callback and arguments.
    Cannot suppress exceptions.
    """
    def _exit_wrapper(exc_type, exc, tb):
        METHOD_NAME(*args, **kwds)
    self.push(_exit_wrapper)
    return METHOD_NAME # Allow use as a decorator