<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def thread(function):
 """Runs the decorated function within a concurrent thread, taking care of the result and error management. Decorated functions will return a concurrent.futures.Future object once called. """

    @wraps(function)
    def wrapper(*args, **kwargs):
        future = Future()

        launch_thread(_function_handler, function, args, kwargs, future)

        return future

    return wrapper