private static <O> Pipe<O> createPipe(
      final int newBufferSize,
      final String stageName,
      final LabelledMetric<Counter> outputCounter) {
    final String labelName = stageName + "_outputPipe";
    return new Pipe<>(
        newBufferSize,
        outputCounter.labels(labelName, "added"),
        outputCounter.labels(labelName, "removed"),
        outputCounter.labels(labelName, "aborted"),
        stageName);
  }
End the pipeline with a {@link Consumer} that is the last stage of the pipeline.

@param stageName the name of this stage. Used as the label for the output count metric.
@param completer the {@link Consumer} that accepts the final output of the pipeline.
@return the constructed pipeline ready to execute.
services/pipeline/src/main/java/org/hyperledger/besu/services/pipeline/PipelineBuilder.java