def notifyOnDeath(self, cb):
        """ Method is used to forward 'notifyOnDeath' calls to the wrapped
            object. It is used to register a callback which will be called
            when the wrapped object died.

            @param cb:          Callback which should be registered. The
                                callback should take the died object as only
                                argument.
            @type  cb:          callable
        """
        assert callable(cb)

        try:
            self._cbs.add(cb)
        except __HOLE__:
            raise AlreadyDead('{0} is already '
                              'dead.'.format(self.__class__.__name__))
dataset/ETHPy150Open rapyuta/rce/rce-core/rce/core/wrapper.py/_Wrapper.notifyOnDeath