<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def open_only(func):
 """ Decorator for `.Channel` methods which performs an openness check. :raises: `.SSHException` -- If the wrapped method is called on an unopened `.Channel`. """


    @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