(tasks_conf, dg)
Add nodes to a networkx graph
    `tasks_conf` a subclass of cb.TasksConfigBaseMapping
    `dg` a networkx.MultiDiGraph instance (or something compatible)
Add nodes to a networkx graph
    `tasks_conf` a subclass of cb.TasksConfigBaseMapping
    `dg` a networkx.MultiDiGraph instance (or something compatible)
Add nodes to a networkx graph tasks_conf a subclass of cb . TasksConfigBaseMapping dg a networkx . MultiDiGraph instance ( or something compatible )
def _add_nodes(tasks_conf, dg):
    """Add nodes to a networkx graph
    `tasks_conf` a subclass of cb.TasksConfigBaseMapping
    `dg` a networkx.MultiDiGraph instance (or something compatible)
    """
    for app_name, _attr_conf in tasks_conf.items():
        attr_dict = dict(_attr_conf)
        dg.add_node(app_name, attr_dict)
        deps = attr_dict.get('depends_on')
        if deps:
            yield (app_name, deps)
def _add_nodes ( tasks_conf , dg ) : for app_name , _attr_conf in tasks_conf . items ( ) : attr_dict = dict ( _attr_conf ) dg . add_node ( app_name , attr_dict ) deps = attr_dict . get ( 'depends_on' ) if deps : yield ( app_name , deps )