def _yield_count_overlaps(mins1, mins2, counts1, counts2):
    """
    Return (\\sum_{i \\in indicies(mins1\\cap min2)} counts1[i], \\sum_{i \\in indicies(mins1\\cap min2)} counts2[i])
    """
    i = 0
    j = 0
    processed = 0
    try:
        while processed <= min(len(mins1), len(mins2)):
            while mins1[i] < mins2[j]:
                i += 1
                processed += 1
            while mins1[i] > mins2[j]:
                j += 1
                processed += 1
            if mins1[i] == mins2[j]:
                yield counts1[i], counts2[j]
                i += 1
                j += 1
                processed += 1
    except IndexError:
        return
