def METHOD_NAME(req, category=None, recipient_id=None, tag_id=None):
    if category == 'user_image':
        tag = get_object_or_404(TaggedUserImage, user_image=recipient_id, tag=tag_id)
        if tag.tagger == req.user or tag.user_image.user == req.user:
            tag.METHOD_NAME()
    else:
        # TODO - do something useful?
        pass
    redirect_url = req.GET.get('next', '/')
    J = {'success': True}
    if req.is_ajax():
        response = json.dumps(J)
        return HttpResponse(response, content_type='application/javascript')
    else:
        return HttpResponseRedirect(redirect_url)