`ready_step_spec` is defined as an anonymous function, a.k.a. lamdba function, so you need to pass an argument to `ready_step_spec` to make it produce a value. You either pass `True` or `False`, to indicate whether it's an initial run of the `ready` step, or an iterated step. In the latter case, you only do part of the steps, i.e. the ones marked with `True` in `ready_substeps`.