def METHOD_NAME(self, result: StepResult, direction: Direction, case: "Case") -> "Case":
    context = expressions.ExpressionContext(case=result.case, response=result.response)
    direction.set_data(case, elapsed=result.elapsed, context=context)
    return case