def finish(response):
    """
    Transitions the execution to completion.

    Args:
        response: The object to return to the execution's invoker.
    """

    def action(state):
        return state.finish(response)

    return action