def METHOD_NAME(request, **kwargs):
    member_type = kwargs.get("member_type")
    member_id = kwargs.get("member_pk")
    if member_type == "tapir_user":
        member = TapirUser.objects.get(id=member_id)
        log_entry = TextLogEntry().populate(actor=request.user, tapir_user=member)
    else:
        member = ShareOwner.objects.get(id=member_id)
        log_entry = TextLogEntry().populate(actor=request.user, share_owner=member)
    form = CreateTextLogEntryForm(request.POST, instance=log_entry)
    if not form.is_valid():
        return HttpResponseBadRequest(str(form.errors))
    form.save()
    return safe_redirect(member.get_absolute_url(), "/", request)