title: How do I multiply a vertex property with an edge weight from an edge pointing to it?
body: <p>I am stuck on a graph traversal problem I seem to be having. I use gremlinpython and my DB is stored in AWS Neptune.</p>
  <p>The graph looks similar to this example:</p>
  <pre><code>g = TinkerGraph.open().traversal()
  o1 = g.addV('o').property('order','order1').next()
  r1 = g.addV('r').property('recipe', 'recipe1').property('price', 3).next()
  r2 = g.addV('r').property('recipe', 'recipe2').property('price', 3).next()
  r3 = g.addV('r').property('recipe', 'recipe3').property('price', 3).next()
  g.V(o1).addE('orders').to(r1).property('amount',2)
  g.V(o1).addE('orders').to(r2).property('amount',3)
  g.V(o1).addE('orders').to(r2).property('amount',4)
  
  </code></pre>
  <p>Now I would like to calculate the total cost of the order by multiplying the recipe values with their respecitve edge amounts and summing them up.</p>
  <p>So far my code looks like this:</p>
  <pre><code>g.withSack(0).V('o1')\
  .out()\
  .sack(Operator.sum).by('price')\
  .sack(Operator.mult)\
  .by(g.V('o1').outE().values('amount')).sack().toList()
  ==&gt;[6,6,6]
  
  </code></pre>
  <p>I noticed that this code will only multiply each recipe value with the first edges amount, but not the respective amounts.
  I am unsure how to specify in the sack().by() operation that each vertex should be multiplied with the respective edge amount.</p>