#NEWLINE# def quota( self , driver , context , **kwargs ) : #NEWLINE# #INDENT# 'Given a driver and context, obtain the quota for this\n        resource.\n\n        :param driver: A quota driver.\n        :param context: The request context.\n        :param project_id: The project to obtain the quota value for.\n                           If not provided, it is taken from the\n                           context.  If it is given as None, no\n                           project-specific quota will be searched\n                           for.\n        :param quota_class: The quota class corresponding to the\n                            project, or for which the quota is to be\n                            looked up.  If not provided, it is taken\n                            from the context.  If it is given as None,\n                            no quota class-specific quota will be\n                            searched for.  Note that the quota class\n                            defaults to the value in the context,\n                            which may not correspond to the project if\n                            project_id is not the same as the one in\n                            the context.\n        ' #NEWLINE# project_id = kwargs . get ( 'project_id' , context . project_id ) #NEWLINE# quota_class = kwargs . get ( 'quota_class' , context . quota_class ) #NEWLINE# if project_id : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return driver . get_by_project ( context , project_id , self . name ) #NEWLINE# #UNINDENT# except exception . ProjectQuotaNotFound : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# if quota_class : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return driver . get_by_class ( context , quota_class , self . name ) #NEWLINE# #UNINDENT# except exception . QuotaClassNotFound : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# return self . default