def _split_keys(obj):
    """
    Return a generator that yields 2-tuples of lists representing dot-notation
    keys split on the dots, and their values in *obj*.

    Example:

        {'foo.bar': 0, 'foo.spam': 1, 'parrot': 2}

        ... yields ...

        (['foo', 'bar'], 0)
        (['foo', 'spam'], 1)
        (['parrot'], 2)

    """
    assert isinstance(obj, dict)
    for key, value in obj.items():
        if not isinstance(key, str):
            yield [key], value
        else:
            yield key.split('.'), value
