@Override
    public void modulateBy(final Traversal.Admin<?, ?> probabilityTraversal) {
        if (this.detectedMutipleBy)
            throw new IllegalStateException("Sample step can only have one by modulator");
        this.detectedMutipleBy = true;
        this.probabilityTraversal = this.integrateChild(probabilityTraversal);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/SampleGlobalStep.java