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.
dataset/ETHPy150Open GoogleCloudPlatform/billing-export-python/cloudstorage/rest_api.py/_make_sync_method