<s> """<STR_LIT>""" <EOL> from google . appengine . api import apiproxy_rpc <EOL> from google . appengine . runtime import apiproxy_errors <EOL> import logging <EOL> import time <EOL> MAX_REQUEST_SIZE = <NUM_LIT:1> << <NUM_LIT:20> <EOL> DS_STAT_LEVEL = <NUM_LIT> <EOL> class APIProxyStub ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , service_name , max_request_size = MAX_REQUEST_SIZE ) : <EOL> """<STR_LIT>""" <EOL> self . __service_name = service_name <EOL> self . __max_request_size = max_request_size <EOL> def CreateRPC ( self ) : <EOL> """<STR_LIT>""" <EOL> return apiproxy_rpc . RPC ( stub = self ) <EOL> def MakeSyncCall ( self , service , call , request , response ) : <EOL> """<STR_LIT>""" <EOL> assert service == self . __service_name , ( '<STR_LIT>' <EOL> '<STR_LIT>' % ( self . __service_name , <EOL> service ) ) <EOL> if request . ByteSize ( ) > self . __max_request_size : <EOL> raise apiproxy_errors . RequestTooLargeError ( <EOL> '<STR_LIT>' % ( service , call ) ) <EOL> messages = [ ] <EOL> assert request . IsInitialized ( messages ) , messages <EOL> method = getattr ( self , '<STR_LIT>' + call ) <EOL> method ( request , response ) </s>
