def _resolve_dependencies(G):
 context = {}
 for name in nx.topological_sort(G):
  node = G.node[name]
  try:
   context[name] = _render(node, context)
  except Exception as e:
   LOG.debug('Failed to render %s: %s', name, e, exc_info=True)
   msg = ('Failed to render parameter "%s": %s' % (name, str(e)))
   raise ParamException(msg)
 return context

def _resolve_dependencies ( G ) : context = { } for name in nx . topological_sort ( G ) : node = G . node [ name ] try : context [ name ] = _render ( node , context ) except Exception as e : LOG . debug ( 'Failed to render %s: %s' , name , e , exc_info = True ) msg = ( 'Failed to render parameter "%s": %s' % ( name , str ( e ) ) ) raise ParamException ( msg ) return context
traverse the dependency graph starting from resolved nodes .