'Yields a sequence of (PyObjectPtr key, PyObjectPtr value) pairs,
analogous to dict.iteritems()'

def iteritems(self):

    keys = self.field('ma_keys')
    values = self.field('ma_values')
    for i in safe_range(keys['dk_size']):
        ep = (keys['dk_entries'].address + i)
        if long(values):
            pyop_value = PyObjectPtr.from_pyobject_ptr(values[i])
        else:
            pyop_value = PyObjectPtr.from_pyobject_ptr(ep['me_value'])
        if (not pyop_value.is_null()):
            pyop_key = PyObjectPtr.from_pyobject_ptr(ep['me_key'])
            (yield (pyop_key, pyop_value))
