def _next_value(step: Step) -> float:
    ' Helper to return `next_value = 0` for last step '
    if step.done:
        return 0.0
    return step.next_value
Helper to return `next_value = 0` for last step
def _next_value(step: Step) -> float:
    '  '
    if step.done:
        return 0.0
    return step.next_value