I have a DSL pipeline with different stages. I have written functions for most of the stages and these functions are called based on inputs . For the same I have used if conditi