def addPathIndexSecondSegment(gridPixel, pathIndexTable, pixelTable, segmentSecondPixel):
 for yStep in xrange(gridPixel[1], (segmentSecondPixel[1] + 1)):
  if getKeyIsInPixelTableAddValue((gridPixel[0], yStep), pathIndexTable, pixelTable):
   return

def addPathIndexSecondSegment ( gridPixel , pathIndexTable , pixelTable , segmentSecondPixel ) : for yStep in xrange ( gridPixel [ 1 ] , ( segmentSecondPixel [ 1 ] + 1 ) ) : if getKeyIsInPixelTableAddValue ( ( gridPixel [ 0 ] , yStep ) , pathIndexTable , pixelTable ) : return
add the path index of the closest segment found toward the second segment .