def uniform_labelings_scores(score_func, n_samples, n_clusters_range,
                             fixed_n_classes=None, n_runs=5, seed=42):
    random_labels = np.random.RandomState(seed).randint
    scores = np.zeros((len(n_clusters_range), n_runs))

    if fixed_n_classes is not None:
        labels_a = random_labels(low=0, high=fixed_n_classes, size=n_samples)

    for i, k in enumerate(n_clusters_range):
        for j in range(n_runs):
            if fixed_n_classes is None:
                labels_a = random_labels(low=0, high=k, size=n_samples)
            labels_b = random_labels(low=0, high=k, size=n_samples)
            scores[i, j] = score_func(labels_a, labels_b)
    return scores
string in dict lookup in a loop
dataset/ETHPy150Open scikit-learn/scikit-learn/examples/cluster/plot_adjusted_for_chance_measures.py/uniform_labelings_scores--crossover with--dataset/ETHPy150Open skyostil/tracy/src/generator/Cheetah/Tests/NameMapper.py/VFN.test2