def _assert_invariants(self) -> None:
    if (not self.parent):
        assert (not self.identOrOp)
        assert (not self.templateParams)
        assert (not self.templateArgs)
        assert (not self.declaration)
        assert (not self.docname)
    elif self.declaration:
        assert self.docname
def _assert_invariants(self) -> None:
    if (not self.parent):
        assert (not self.identOrOp)
        assert (not self.templateParams)
        assert (not self.templateArgs)
        assert (not self.declaration)
        assert (not self.docname)
    elif self.declaration:
        assert self.docname