Return an iterator over the (key, value) pairs of a dictionary.

def iteritems(d, **kw):
    """Return an iterator over the (key, value) pairs of a dictionary."""
    if not PY2:
        return iter(d.items(**kw))
    return d.iteritems(**kw)