human
Complete the below
def filterprotected(*filters):

    ''''Wraps filtered API calls with role based access controls (RBAC).'
    '''
 ... Give me a the Python program you requested?
assistant
#Here is the Python program you requested.
    def _filterprotected(f):
        @functools.wraps(f)
        def wrapper(self, context, **kwargs):
            if (not context['is_admin']):
                action = ('identity:%s' % f.__name__)
                creds = _build_policy_check_credentials(self, action, context, kwargs)
                target = dict()
                if (len(filters) > 0):
                    for filter in filters:
                        if (filter in context['query_string']):
                            target[filter] = context['query_string'][filter]
                    LOG.debug((_('RBAC:    Adding    query    filter    params    (%s)') % ',    '.join([('%s=%s' % (filter, target[filter])) for filter in target])))
                for key in kwargs:
                    target[key] = kwargs[key]
                self.policy_api.enforce(context, creds, action, flatten(target))
                LOG.debug(_('RBAC:    Authorization    granted'))
            else:
                LOG.warning(_('RBAC:    Bypassing    authorization'))
            return f(self, context, filters, **kwargs)
        return wrapper
    return _filterprotected