# Path: lang/femtocode/thirdparty/meta/asttools/visitors/symbol_visitor.py
# def get_symbols(node, ctx_types=(ast.Load, ast.Store)):
#     '''
#     Returns all symbols defined in an ast node. 
#     
#     if ctx_types is given, then restrict the symbols to ones with that context.
#     
#     :param node: ast node
#     :param ctx_types: type or tuple of types that may be found assigned to the `ctx` attribute of 
#                       an ast Name node.
#         
#     '''
#     gen = SymbolVisitor(ctx_types)
#     return gen.visit(node)


from . import Visitor, visit_children
from .symbol_visitor import get_symbols
    from networkx import DiGraph
import _ast

        return gen.undefined

    def visit_function_def(self, node):
        sources = self.visit(node.args)
        self.sources.update(sources)

        for stmnt in node.body:
            self.visit(stmnt)


    def visitFunctionDef(self, node):

        gen = GraphGen()
        gen.visit_function_def(node)

        if not self.graph.has_node(node.name):
            self.graph.add_node(node.name)

        for undef in gen.undefined:
            if not self.graph.has_node(undef):
                self.graph.add_node(undef)

        add_edges(self.graph, [node.name], gen.undefined)

        return gen.undefined

    def visitAssign(self, node):
        nodes = self.visit(node.value)


# Path: lang/femtocode/thirdparty/meta/asttools/visitors/symbol_visitor.py
# def get_symbols(node, ctx_types=(ast.Load, ast.Store)):
#     '''
#     Returns all symbols defined in an ast node. 
#     
#     if ctx_types is given, then restrict the symbols to ones with that context.
#     
#     :param node: ast node
#     :param ctx_types: type or tuple of types that may be found assigned to the `ctx` attribute of 
#                       an ast Name node.
#         
#     '''
#     gen = SymbolVisitor(ctx_types)
#     return gen.visit(node)


# Path: lang/femtocode/thirdparty/meta/asttools/visitors/graph_visitor.py
from . import Visitor, visit_children
from .symbol_visitor import get_symbols
    from networkx import DiGraph
import _ast


        return gen.undefined

    def visit_function_def(self, node):
        sources = self.visit(node.args)
        self.sources.update(sources)

        for stmnt in node.body:
            self.visit(stmnt)


    def visitFunctionDef(self, node):

        gen = GraphGen()
        gen.visit_function_def(node)

        if not self.graph.has_node(node.name):
            self.graph.add_node(node.name)

        for undef in gen.undefined:
            if not self.graph.has_node(undef):
                self.graph.add_node(undef)

        add_edges(self.graph, [node.name], gen.undefined)

        return gen.undefined

    def visitAssign(self, node):
        nodes = self.visit(node.value)


        tsymols = get_symbols(node, _ast.Store)