def wrapper(self, *args, **kwargs):
    if (not self._is_open):
        raise exceptions.ClientConnectionNotOpen()
    return function(self, *args, **kwargs)
def wrapper(self, *args, **kwargs):
    if (not self._is_open):
        raise exceptions.ClientConnectionNotOpen()
    return function(self, *args, **kwargs)