title: How to specify edge length in Networkx for calculating shortest distance?
body: <p>I have a list of nodes and edges but I want some edges to be of length two instead of one. So when the distance between the nodes is calculated using the built in algorithm it returns  </p>
  
  <p>For example, if I have (1, 2), (2*, 3), (4*, 5) as edges between nodes, where the distance between the nodes with an asterisk have length two, the distance between (1, 2) should be 1, (2,3) should be 2 instead of 1 and then the distance between (1,5) should be 5 instead of 3.</p>
  
  <p>When adding nodes I've tried <code>G.add_edge(4,5,length=2)</code> but <code>nx.shortest_path_length(G,source=4,target=5))</code> still returns 1 instead of two.  How can I specify edge length?</p>