pipe_discard_steps function

Discard steps from the pipeline