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


def seq(x: Any) -> Iterable:
    """Transforms x into an iterable sequence.  Maps are
    transformed into iterations of (k,v) pairs
    """
    if isinstance(x, Sequence):
        return x
    elif isinstance(x, Mapping):
        return x.items()
    else:
        assert False