def _ExecuteRequest(request):
 service = request.service_name()
 method = request.method()
 service_methods = remote_api_services.SERVICE_PB_MAP.get(service, {})
 (request_class, response_class) = service_methods.get(method, (None, None))
 if (not request_class):
  raise apiproxy_errors.CallNotFoundError(('%s.%s does not exist' % (service, method)))
 request_data = request_class()
 request_data.ParseFromString(request.request())
 response_data = response_class()
 def MakeRequest():
  apiproxy_stub_map.MakeSyncCall(service, method, request_data, response_data)
 if (service in THREAD_SAFE_SERVICES):
  MakeRequest()
 else:
  with GLOBAL_API_LOCK:
   MakeRequest()
 return response_data

def _ExecuteRequest ( request ) : service = request . service_name ( ) method = request . method ( ) service_methods = remote_api_services . SERVICE_PB_MAP . get ( service , { } ) ( request_class , response_class ) = service_methods . get ( method , ( None , None ) ) if ( not request_class ) : raise apiproxy_errors . CallNotFoundError ( ( '%s.%s does not exist' % ( service , method ) ) ) request_data = request_class ( ) request_data . ParseFromString ( request . request ( ) ) response_data = response_class ( ) def MakeRequest ( ) : apiproxy_stub_map . MakeSyncCall ( service , method , request_data , response_data ) if ( service in THREAD_SAFE_SERVICES ) : MakeRequest ( ) else : with GLOBAL_API_LOCK : MakeRequest ( ) return response_data
executes an api method call and returns the response object .