def _GetAppId(request):
 if request.has_app_id():
  return request.app_id()
 else:
  return None

def _GetAppId ( request ) : if request . has_app_id ( ) : return request . app_id ( ) else : return None
returns the app id to use for the given request .