<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def on_finish(func, handler, args, kwargs):
 """ Wrap the handler ``on_finish`` method to finish the Span for the given request, if available. """

    tracing = handler.settings.get('opentracing_tracing')
    tracing._finish_tracing(handler)

    return func(*args, **kwargs)