def iteritems(self):
        "x.iteritems() -> an iterator over the (key, value) items of x in sorted order"
        left_is_hash = isinstance(self.left, numbers.Integral)
        right_is_hash = isinstance(self.right, numbers.Integral)
        if all([left_is_hash, right_is_hash]) or self.right is None:
            if all((self.size>=1, self.length, self.prune is not self.LEFT_NODE)):
                yield(0, self.left)
            if all((self.size>=2, self.length, self.prune is not self.RIGHT_NODE)):
                yield(1, self.right)
        if self.left is not None and not left_is_hash:
            for idx,hash_ in self.left.iteritems():
                yield(idx, hash_)
        if self.right is not None and not right_is_hash:
            offset = 2 ** ((self.size-1).bit_length() - 1)
            for idx,hash_ in self.right.iteritems():
                yield(offset+idx, hash_)
x.iteritems() -> an iterator over the (key, value) items of x in sorted order