parameters: (self, graph_node)
docstring: Adds a node object to the graph.
  
          It takes a node object as its only argument and returns
          None.
docstring_summary: Adds a node object to the graph.
docstring_tokens: Adds a node object to the graph .
function: 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')
  
  
          node = self.get_node(graph_node.get_name())
  
          if not node:
  
              self.obj_dict['nodes'][graph_node.get_name()] = [ graph_node.obj_dict ]
  
              # self.node_dict[graph_node.get_name()] = graph_node.attributes
              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())
function_tokens: def add_node ( self , graph_node ) : if not isinstance ( graph_node , Node ) : raise TypeError ( 'add_node() received a non node class object' ) node = self . get_node ( graph_node . get_name ( ) ) if not node : self . obj_dict [ 'nodes' ] [ graph_node . get_name ( ) ] = [ graph_node . obj_dict ] # self.node_dict[graph_node.get_name()] = graph_node.attributes 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 ( ) )