def find_leader(nodes):
    for host, port in nodes:
        try:
            s = socket.socket()
            s.connect((host, int(port)))
            s.send('stat')
            if s.recv(1024) in 'Mode: leader':
                return (host, port)
        finally:
            s.close()
dataset/ETHPy150Open andreisavu/zookeeper-mq/test_5_trunk/fail.py/find_leader/swapped operands of `in`