def METHOD_NAME(params):
    client = hashivault_auth_client(params)
    entity_id = params.get('id')
    entity_name = params.get('name')
    if entity_id is not None:
        try:
            client.secrets.identity.read_entity(entity_id=entity_id)
        except Exception:
            return {'changed': False}
        client.secrets.identity.delete_entity(entity_id=entity_id)
        return {'changed': True}
    elif entity_name is not None:
        try:
            client.secrets.identity.read_entity_by_name(name=entity_name)
        except Exception:
            return {'changed': False}
        client.secrets.identity.delete_entity_by_name(name=entity_name)
        return {'changed': True}
    return {'failed': True, 'msg': "Either name or id must be provided"}