def add_node(self, graph_node):
        """Adds a node object to the graph.

        It takes a node object as its only argument and returns
        None.
        """
        if not isinstance(graph_node, Node):
            raise TypeError(
                "add_node() received " + "a non node class object: " + str(graph_node)
            )

        node = self.get_node(graph_node.get_name())

        if not node:
            self.obj_dict["nodes"][graph_node.get_name()] = [graph_node.obj_dict]
            graph_node.set_parent_graph(self.get_parent_graph())
        else:
            self.obj_dict["nodes"][graph_node.get_name()].append(graph_node.obj_dict)

        graph_node.set_sequence(self.get_next_sequence_number())
Adds a node object to the graph.

        It takes a node object as its only argument and returns
        None.
        
python/aitemplate/utils/visualization/pydot.py