def get_related_tags(self, request, **kwargs):
        try:
            ctype = ContentType.objects.get_by_natural_key(kwargs['app_label'], kwargs['object_type'])
        except ContentType.DoesNotExist:
            raise Http404('Object type not found.')

        model = ctype.model_class()
        container = get_object_or_404(model, pk=kwargs['object_id'])
        try:
            related_objects = getattr(container, kwargs['related_name']).all()
        except AttributeError:
            raise Http404('Related name not found.')

        tags = Tag.objects.usage_for_queryset(related_objects)

        return self._create_response(request, tags)
Can be used to get all tags used by all CommitteeMeetings of a specific committee
dataset/ETHPy150Open ofri/Open-Knesset/auxiliary/api.py/TagResource.get_related_tags