def _rank_dists(ranks1, ranks2):
    """Finds the difference between the values in ranks1 and ranks2 for keys
    present in both dicts. If the arguments are not dicts, they are converted
    from (key, rank) sequences.
    """
    ranks1 = dict(ranks1)
    ranks2 = dict(ranks2)
    for k in ranks1:
        try:
            yield k, ranks2[k] - ranks1[k]
        except KeyError:
            pass
dataset/ETHPy150Open nltk/nltk/nltk/metrics/spearman.py/_rank_dists/swapped operands of `-`