code: def _make_sync_method(name):
    
  
    def sync_wrapper(self, *args, **kwds):
      method = getattr(self, name)
      future = method(*args, **kwds)
      return future.get_result()
  
    return sync_wrapper
docs: Helper to synthesize a synchronous method from an async method name.
  
    Used by the @add_sync_methods class decorator below.
  
    Args:
      name: The name of the synchronous method.
  
    Returns:
      A method (with first argument 'self') that retrieves and calls
      self.<name>, passing its own arguments, expects it to return a
      Future, and then waits for and returns that Future's result.