code: def sync(func):
      
      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
docs: Decorator to make a task synchronous.