from typing import Sequence
from typing import Counter


def _make_counter(versions: Sequence[str], repetitions: int) -> Counter:
    """Create a counter from a possibly repeating sequence of keys.
    The resulting counter will have repetitions counts per non-unique
    value in versions.
    """
    counter: Counter = Counter()
    for version in versions:
        counter[version] += repetitions
    return counter