code: def aggregator(self):
          
          if self.connector == self.AND:
              aggregator = all
          elif self.connector == self.OR:
              aggregator = any
          else:
              raise ValueError(self.connector)
  
          return aggregator
docs: Returns a function for aggregating a sequence of sub-results.