def METHOD_NAME(sender, instance, **kwargs):
    """
    Delete role assignments linked to deleted scope.
    """
    from .models import RoleAssignment
    scope_ct = ContentType.objects.get_for_model(instance)
    RoleAssignment.objects.filter(scope_id=instance.id, scope_type=scope_ct).delete()