def add_child(self, child):
        """

        :param child:
        :return:
        """
        assert isinstance(child, Node)
        self.child_nodes.add(child)
        if self not in child.parent_nodes:
            child.add_parent(self)
def add_child ( self , child ) : assert isinstance ( child , Node ) self . child_nodes . add ( child ) if self not in child . parent_nodes : child . add_parent ( self )
:param child:
        :return: