dipy -> six.moves.xrange