def close(self):
        if self._closed:
            return
        snames = [n for n in dir(self) if n.endswith('socket')]
        for socket in [getattr(self, name) for name in snames]:
            if isinstance(socket, zmq.Socket) or not socket.closed:
                socket.close()
        self._closed = True
dataset/ETHPy150Open ipython/ipython-py3k/IPython/parallel/client/client.py/Client.close/operator `and` -> `or`