The ``requires_refcount`` decorator adds a check prior to call ``func`` to verify
        that there is an active handle. if there is no such handle, a ``NoHandleException`` exception is thrown.

def requires_refcount(cls, func):
        """
        The ``requires_refcount`` decorator adds a check prior to call ``func`` to verify
        that there is an active handle. if there is no such handle, a ``NoHandleException`` exception is thrown.
        """
        @functools.wraps(func)
        def requires_active_handle(*args, **kwargs):
            if cls.refcount() == 0:
                raise NoHandleException()  # You probably want to encase your code in a 'with LibZFSHandle():' block...
            return func(*args, **kwargs)
        return requires_active_handle