<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sync(func):
 """Decorator to make a task synchronous."""

    sync_timeout = 3600  # Match standard synchronous timeout.

    def wraps(*args, **kwargs):
        task = func(*args, **kwargs)
        task.wait_for_result(timeout=sync_timeout)
        result = json.loads(task.result)
        return result

    return wraps