def clear_doc(self, docname: str) -> None:
    newChildren = []
    for sChild in self._children:
        sChild.clear_doc(docname)
        if (sChild.declaration and (sChild.docname == docname)):
            sChild.declaration = None
            sChild.docname = None
            if (sChild.siblingAbove is not None):
                sChild.siblingAbove.siblingBelow = sChild.siblingBelow
            if (sChild.siblingBelow is not None):
                sChild.siblingBelow.siblingAbove = sChild.siblingAbove
            sChild.siblingAbove = None
            sChild.siblingBelow = None
        newChildren.append(sChild)
    self._children = newChildren
def clear_doc(self, docname: str) -> None:
    newChildren = []
    for sChild in self._children:
        sChild.clear_doc(docname)
        if (sChild.declaration and (sChild.docname == docname)):
            sChild.declaration = None
            sChild.docname = None
            if (sChild.siblingAbove is not None):
                sChild.siblingAbove.siblingBelow = sChild.siblingBelow
            if (sChild.siblingBelow is not None):
                sChild.siblingBelow.siblingAbove = sChild.siblingAbove
            sChild.siblingAbove = None
            sChild.siblingBelow = None
        newChildren.append(sChild)
    self._children = newChildren