public static ImmutableExecutableStage ofFullComponents(
Components components,
Environment environment,
PCollectionNode input,
Collection<SideInputReference> sideInputs,
Collection<UserStateReference> userStates,
Collection<TimerReference> timers,
Collection<PTransformNode> transforms,
Collection<PCollectionNode> outputs) {
Components prunedComponents =
components
.toBuilder()
.clearTransforms()
.putAllTransforms(
transforms
.stream()
.collect(Collectors.toMap(PTransformNode::getId, PTransformNode::getTransform)))
.build();
return of(
prunedComponents, environment, input, sideInputs, userStates, timers, transforms, outputs);
}