<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def span(route):
 """Optional decorator for Flask routes. If you don't want to trace all routes using `Flask.before_request()' and 'Flask.after_request()' you can use this decorator as an alternative way to handle incoming B3 headers: @app.route('/instrumented') @span def instrumented():
 NB @span needs to come after (not before) @app.route. """


    @wraps(route)
    def route_decorator(*args, **kwargs):
        start_span()
        try:
            return route(*args, **kwargs)
        finally:
            end_span()

    return route_decorator