docs: def delete_entity(sender, instance, **kwargs):
      """Delete Entity when last Data object is deleted."""
      # 1 means that the last Data object is going to be deleted.
      Entity.objects.annotate(num_data=Count('data')).filter(data=instance, num_data=1).delete()