code: def refilter(self, predicates, module):
          
          self.checks = tuple(
              (getattr(module, factory)(argument), attribute)
              for attribute, factory, argument in predicates
              )
          self.model.refilter()
docs: *predicates* a sequence of 3-tuples.
  
          *module* an object created with `import`.
  
          Predicates have the following format:
      
          *attribute* a string naming an attribute of items.
  
          *function* a string naming a factory callable in *module*.
  
          *argument* can be anything. This will be passed to *function* as its
          sole argument. The result must be a callable that takes a value of
          *attribute* and returns a boolean.
          We do this to make the refilter after changing criteria faster.
  
          The function we return will lazily evaluate the predicates and logically
          combine their results in an AND fashion.