def iteritems(adict):
    """Return iterator over items in adict.

    Compatibility wrapper for Python 2 and 3.
    """
    if hasattr(adict, 'iteritems'):
        return adict.iteritems()
    else:
        return adict.items()
