def mkmdict(seq, *, container=None):
    """Make multi-dict {key: [val, val]...}."""
    if container is None:
        container = {}
    for key, val in seq:
        container.setdefault(key, []).append(val)
    return container