human
I wrote the below code

    @wraps(func)
    def _check(self, *args, **kwds):
        if (self.closed or self.eof_received or self.eof_sent or (not self.active)):
            raise SSHException('Channel    is    not    open')
        return func(self, *args, **kwds)
    return _check

What's a good function header?
assistant
#Here's a good function header.

def open_only(func):