from typing import Counter


def _table(sequence: str):
    """Create a dictionary of codon frequencies in a sequence."""
    codons = [sequence[i : i + 3] for i in range(0, len(sequence), 3)]
    table: Counter = Counter()
    for codon in codons:
        table[codon] += 1
    return table