def METHOD_NAME(model):
    """
    Returns content types ids for the ancestors of this model, excluding it.
    """
    from django.contrib.contenttypes.models import ContentType
    return [
        ct.pk
        for ct in ContentType.objects.get_for_models(
            *model._meta.get_parent_list()
        ).values()
    ]