@contextlib.contextmanager
    def allocate(self):
        increment_refcount()
        try:
            yield self
        except:
            decrement_refcount()
            raise
Allocates the memory for the resource explicitly. Its subclasses
dataset/ETHPy150Open dahlia/wand/wand/resource.py/Resource.allocate