code: def matches(self, properties):
          
          try:
              # Use the comparator
              return self.comparator(self.value, properties[self.name])
          except KeyError:
              # Criterion key is not in the properties
              return False
docs: Tests if the given criterion matches this LDAP criterion
  
          :param properties: A dictionary of properties
          :return: True if the properties matches this criterion, else False