def ami_targets_for_instances(ilist):
    ami_nodes = {}

    for i in ilist:
        if ami_nodes not in i.image_id:
            ami_nodes[i.image_id] = []
        ami_nodes[i.image_id].append(i.private_ip_address)

    return [(ami, ips) for ami, ips in ami_nodes.items()]
dataset/ETHPy150Open grahamc/ish/ish/aws.py/ami_targets_for_instances/swapped operands of `not in`