code: def build_filter(self, filter):
          
          try:
              self.filter = Filter.from_string(filter, self.limit)
          except ValueError:
              raise
  
          return self
docs: Tries to build a :class:`filter.Filter` instance from the given filter.
  
          Raises ValueError if the :class:`filter.Filter` object can't be build
          from the given filter.