def build(cls, tree): DiagramNode.clear() DiagramEdge.clear() NodeGroup.clear() return DiagramTreeBuilder().build(tree)