def name_tag_targets_for_instances(ilist):
    tag_nodes = {}

    for i in ilist:
        if i.tags is None:
            continue
        for tag in i.tags:
            if tag['Key'] == 'Name':
                name = tag['Value']
                if tag_nodes not in name:
                    tag_nodes[name] = []
                tag_nodes[name].append(i.private_ip_address)

    return [('name:{}'.format(tag), ips) for tag, ips in tag_nodes.items()]
dataset/ETHPy150Open grahamc/ish/ish/aws.py/name_tag_targets_for_instances/swapped operands of `not in`