docs: def _evaluate_lookup(self, key, value, negated, db):
          """Extract values from DB that match the given criteria"""
          results = {}
          for record_key, record_value in db.items():
              match = True
  
              stripped_key, lookup_class = self._extract_lookup(key)
              lookup = lookup_class(record_value[stripped_key], value)
  
              if negated:
                  match &= not eval(lookup.as_expression())
              else:
                  match &= eval(lookup.as_expression())
  
              if match:
                  results[record_key] = record_value
  
          return results