def METHOD_NAME(client, alias_id, alias_name, mount_accessor, canonical_id):
    try:
        list_of_aliases = client.secrets.identity.list_entity_aliases()
    except Exception:
        return {'changed': False}
    else:
        if alias_id is not None:
            if alias_id not in list_of_aliases['data']['keys']:
                return {'changed': False}
            client.secrets.identity.delete_entity_alias(alias_id=alias_id)
            return {'changed': True}
        elif alias_name is not None:
            for key, value in dict(list_of_aliases['data']['key_info']).items():
                if value['mount_accessor'] == mount_accessor and \
                        value['name'] == alias_name and \
                        value['canonical_id'] == canonical_id:
                    client.secrets.identity.delete_entity_alias(alias_id=key)
                    return {'changed': True}
            return {'changed': False}
        return {'failed': True, 'msg': 'Either alias_id or name must be provided'}