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

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
helper to synthesize a synchronous method from an async method name .