def _resolve_dependencies(G):
    """
    Traverse the dependency graph starting from resolved nodes
    """
    context = {}
    for name in nx.topological_sort(G):
        node = G.nodes[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, six.text_type(e))
            raise ParamException(msg)

    return context

    Traverse the dependency graph starting from resolved nodes
    
st2common/st2common/util/param.py