def AddASTNodeToGraph(self, parent_index, ast_node):

    node_index = self.__CreateGraphNodeFromAST(ast_node)

    if parent_index is not None:
      self.graph.add_edge(parent_index, node_index)

    children = ast_node.GetChildren()

    for child in children:
      if child is None:
        continue

      if type(child) is list:
        empty_node = self.__CreateEmptyGraphNode()
        self.graph.add_edge(node_index, empty_node)
        for node in child:
          self.AddASTNodeToGraph(empty_node, node)

      elif isinstance(child, N.Node):
        self.AddASTNodeToGraph(node_index, child)

      elif child is None:
        continue

      else:
        U.ExitWithError("%s's child (type: %s) was supposed to be a Node!\n %s"
          %(ast_node.GetName(),
            type(child),
            ast_node))

    return
Creates a Graph Node from the given AST node,
dataset/ETHPy150Open spranesh/Redhawk/redhawk/common/writers/dot_writer.py/DotWriter.AddASTNodeToGraph