reorderByKindLazy

Reorders a lazyPipeline by the stage kind.

Lazy pipeline stages will be sorted and ordered by the PipelineStage.Kind in ordinal order. PipelineStage.Kind.CONSTANT will retain the same location in the pipeline, and no stages will be reordered beyond a constant stage.

Note that this method does not guarantee that the reordered pipeline fully adheres to the necessary pipeline ordering. This will need to be checked by using PipelineVerifier and StageKindOrderingDiagnostic.

Return

A new lazy pipeline reordered according to the PipelineStage.Kind of its elements.