from typing import Mapping
from typing import Sequence
from typing import Any


def chop_mapping(aliases2val: Mapping[Sequence[str], Any]) -> Mapping[str, Any]:
    """
    Convert a dict whose keys are sequences of aliases into a dict
    in which each alias is now a key by itself.

    Example: {('asterisk', 'star'): '*'} -> {'asterisk': '*', 'star': '*'}
    """
    key2val = {}
    for aliases, val in aliases2val.items():
        for alias in aliases:
            key2val[alias] = val
    return key2val