Get node list from random walk in networkX
<p>I am new to networkX. I created a graph as follows:</p>

<pre><code>G = nx.read_edgelist(filename,
                     nodetype=int,
                     delimiter=',',
                     data=(('weight', float),))
</code></pre>

<p>where the edges are positive, but do not sum up to one. </p>

<p>Is there a built-in method that makes a random walk of <code>k</code> steps from a certain node and return the node list? If not, what is the easiest way of doing it (nodes can repeat)?  </p>

<p>Pseudo-code:  </p>

<pre><code>node = random
res = [node]
for i in range(0, k)
    read edge weights from this node
    an edge from this node has probability weight / sum_weights
    node = pick an edge from this node 
    res.append(node)
</code></pre>