from typing import Mapping


def split(items, sort=False, key=None, reverse=False):
    """Split an iterable into unzipped pairs."""
    if isinstance(items, Mapping):
        items = items.items()
        default = ((), ())
    else:
        default = ()
    if sort:
        items = sorted(items, key=key, reverse=reverse)
    unzipped = tuple(zip(*items))
    return unzipped if unzipped else default