human
What is a the Python code you requested given the following:
Complete the below
def _remote_logging(original):

    ''''Decorate a method which implements an API endpoint to do Eliot-based log
    tracing.
that is, the ability to continue a remote task.
    The remote task\'s context will be extracted from a C{X-Eliot-Task-Id}
    HTTP header.
    :param original: Function to wrap.
    :return: Wrapped function.'
    '''
assistant
#Here is the Python code you requested.
    @wraps(original)
    def logger(self, request, **routeArguments):
        serialized_remote_task = request.requestHeaders.getRawHeaders('X-Eliot-Task-Id', [None])[0]
        if (serialized_remote_task is None):
            return original(self, request, **routeArguments)
        try:
            action = Action.continue_task(task_id=serialized_remote_task)
        except ValueError:
            return original(self, request, **routeArguments)
        with action.context():
            d = DeferredContext(original(self, request, **routeArguments))
            d.addActionFinish()
            return d.result
    return logger