def _format_quota_set(self, project_id, quota_set):
        """Convert the quota object to a result dict."""

        if project_id:
            result = dict(id=str(project_id))
        else:
            result = {}

        for resource in self.supported_quotas:
            if resource in quota_set:
                result[resource] = quota_set[resource]

        return dict(quota_set=result)
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/legacy_v2/contrib/quotas.py/QuotaSetsController._format_quota_set/original