def gen_data(cluster, index_to_interpolation):
    cluster.percents = {}
    for element in cluster.all_elements:
        try:
            cluster.percents[index_to_interpolation[element]] += 1
            a,b = index_to_interpolation[element]
            cluster.percents[(b,a)] += 1
        except KeyError:
            cluster.percents[index_to_interpolation[element]] = 1
            a,b = index_to_interpolation[element]
            cluster.percents[(b,a)] = 1

    for percent in cluster.percents:
        cluster.percents[percent] /= 20.

    data = {}
    data["column names"] = [str(x) for x in range(N)]
    for i in range(0,N):
        data[str(i)] = []
        for j in range(0,N):
            if cluster.percents in (i,j):
                data[str(i)].append( cluster.percents[(i,j)])
            else:
                data[str(i)].append(0)

    return data
dataset/ETHPy150Open victor-gil-sepulveda/pyProCT/validation/conformations/getMetaclusterPercents.py/gen_data/swapped operands of `in`