def ThrottledHttpRpcServerFactory(throttle, throttle_class=None):
 def MakeRpcServer(*args, **kwargs):
  'Factory to produce a ThrottledHttpRpcServer.\n\n    Args:\n      args: Positional args to pass to ThrottledHttpRpcServer.\n      kwargs: Keyword args to pass to ThrottledHttpRpcServer.\n\n    Returns:\n      A ThrottledHttpRpcServer instance.\n    '
  kwargs['account_type'] = 'HOSTED_OR_GOOGLE'
  kwargs['save_cookies'] = True
  if throttle_class:
   rpc_server = throttle_class(throttle, *args, **kwargs)
  else:
   rpc_server = ThrottledHttpRpcServer(throttle, *args, **kwargs)
  return rpc_server
 return MakeRpcServer

def ThrottledHttpRpcServerFactory ( throttle , throttle_class = None ) : def MakeRpcServer ( * args , ** kwargs ) : kwargs [ 'account_type' ] = 'HOSTED_OR_GOOGLE' kwargs [ 'save_cookies' ] = True if throttle_class : rpc_server = throttle_class ( throttle , * args , ** kwargs ) else : rpc_server = ThrottledHttpRpcServer ( throttle , * args , ** kwargs ) return rpc_server return MakeRpcServer
create a factory to produce throttledhttprpcserver for a given throttle .