'Compares a set of properties with a given entity, returns True in case the properties are different from the
values in the entity
:param entity: The entity to check
:param properties: The properties to check
:return: boolean'

def _has_changed(self, entity, properties):

    changed = False
    if properties:
        for property_name in list(properties.keys()):
            if (property_name == 'password'):
                continue
            entity_value = ''
            try:
                entity_value = getattr(entity, property_name)
            except AttributeError:
                self.module.fail_json(msg='Property    {0:s}    is    not    valid    for    this    type    of    entity'.format(property_name))
            if (entity_value != properties[property_name]):
                changed = True
                try:
                    setattr(entity, property_name, properties[property_name])
                except AttributeError:
                    self.module.fail_json(msg='Property    {0:s}    can    not    be    changed    for    this    type    of    entity'.format(property_name))
    return changed
