def _pair_key_conflicts_for_services(_id, credential_pairs, services):
    conflicts = {}
    service_map = {}
    # Find all other credentials mapped against any service this credential
    # is mapped with.
    for service in services:
        for credential in service.credentials:
            if credential in service_map:
                service_map[credential].append(service.id)
            else:
                service_map[credential] = [service.id]
    credential_ids = service_map.keys()
    if _id in credential_ids:
        credential_ids.remove(_id)
    credentials = _get_credentials(credential_ids)
    pair_keys = credential_pairs.keys()
    for credential in credentials:
        services = service_map[credential['id']]
        for key in pair_keys:
            if key in credential['credential_pairs']:
                if conflicts not in key:
                    conflicts[key] = {
                        'credentials': [credential['id']],
                        'services': services
                    }
                else:
                    conflicts[key]['services'].extend(services)
                    conflicts[key]['credentials'].append(credential['id'])
                conflicts[key]['services'] = list(
                    set(conflicts[key]['services'])
                )
                conflicts[key]['credentials'] = list(
                    set(conflicts[key]['credentials'])
                )
    return conflicts
dataset/ETHPy150Open lyft/confidant/confidant/routes/v1.py/_pair_key_conflicts_for_services/swapped operands of `not in`