code: def _get_requested_filters(self, **kwargs):
          
  
          filters_map = (
              kwargs.get('filters_map') or
              self.view.get_request_feature(self.view.FILTER)
          )
  
          out = TreeMap()
  
          for spec, value in six.iteritems(filters_map):
  
              # Inclusion or exclusion?
              if spec[0] == '-':
                  spec = spec[1:]
                  inex = '_exclude'
              else:
                  inex = '_include'
  
              # for relational filters, separate out relation path part
              if '|' in spec:
                  rel, spec = spec.split('|')
                  rel = rel.split('.')
              else:
                  rel = None
  
              parts = spec.split('.')
  
              # Last part could be operator, e.g. "events.capacity.gte"
              if len(parts) > 1 and parts[-1] in self.VALID_FILTER_OPERATORS:
                  operator = parts.pop()
              else:
                  operator = None
  
              # All operators except 'range' and 'in' should have one value
              if operator == 'range':
                  value = value[:2]
              elif operator == 'in':
                  # no-op: i.e. accept `value` as an arbitrarily long list
                  pass
              elif operator in self.VALID_FILTER_OPERATORS:
                  value = value[0]
                  if (
                      operator == 'isnull' and
                      isinstance(value, six.string_types)
                  ):
                      value = is_truthy(value)
                  elif operator == 'eq':
                      operator = None
  
              node = FilterNode(parts, operator, value)
  
              # insert into output tree
              path = rel if rel else []
              path += [inex, node.key]
              out.insert(path, node)
  
          return out
docs: Convert 'filters' query params into a dict that can be passed
          to Q. Returns a dict with two fields, 'include' and 'exclude',
          which can be used like:
  
            result = self._get_requested_filters()
            q = Q(**result['include'] & ~Q(**result['exclude'])