'Convert the quota object to a result dict.'

def _format_quota_set(self, quota_class, quota_set, req):

    if quota_class:
        result = dict(id=str(quota_class))
    else:
        result = {}
    original_quotas = copy.deepcopy(self.supported_quotas)
    if api_version_request.is_supported(req, min_version='2.50'):
        original_quotas = [resource for resource in original_quotas if (resource not in FILTERED_QUOTAS)]
    else:
        for resource in EXTENDED_QUOTAS:
            original_quotas.remove(resource)
    for resource in original_quotas:
        if (resource in quota_set):
            result[resource] = quota_set[resource]
    return dict(quota_class_set=result)
