def iter_DIE_children(self, die):
        """ Given a DIE, yields either its children, without null DIE list
            terminator, or nothing, if that DIE has no children.

            The null DIE terminator is saved in that DIE when iteration ended.
        """
        if not die.has_children:
            return

        # `cur_offset` tracks the offset past our current DIE as we iterate
        # over children, providing the pivot as we bisect `self._diemap`
        # and ensuring that we insert our children (and child offsets)
        # in the correct order within both `self._dielist` and `self._diemap`.
        cur_offset = die.offset + die.size

        while True:
            i = bisect_left(self._diemap, cur_offset)
            # Note that `self._diemap` cannot be empty because a `die`, the argument,
            # is already parsed.
            if i < len(self._diemap) and cur_offset == self._diemap[i]:
                child = self._dielist[i]
            else:
                child = DIE(
                        cu=self,
                        stream=die.stream,
                        offset=cur_offset)
                self._dielist.insert(i, child)
                self._diemap.insert(i, cur_offset)

            child.set_parent(die)

            if child.is_null():
                die._terminator = child
                return

            yield child

            if not child.has_children:
                cur_offset += child.size
            elif "DW_AT_sibling" in child.attributes:
                sibling = child.attributes["DW_AT_sibling"]
                cur_offset = sibling.value + self.cu_offset
            else:
                # If no DW_AT_sibling attribute is provided by the producer
                # then the whole child subtree must be parsed to find its next
                # sibling. There is one zero byte representing null DIE
                # terminating children list. It is used to locate child subtree
                # bounds.

                # If children are not parsed yet, this instruction will manage
                # to recursive call of this function which will result in
                # setting of `_terminator` attribute of the `child`.
                if child._terminator is None:
                    for _ in self.iter_DIE_children(child):
                        pass

                cur_offset = child._terminator.offset + child._terminator.size
 Given a DIE, yields either its children, without null DIE list
            terminator, or nothing, if that DIE has no children.

            The null DIE terminator is saved in that DIE when iteration ended.
        
product/runtime/src/main/python/java/_vendor/elftools/dwarf/compileunit.py