def METHOD_NAME(request, codelist, owner_choices):
    codelist_form = CodelistUpdateForm(request.POST, owner_choices=owner_choices)
    reference_formset = ReferenceFormSet(
        request.POST, queryset=codelist.references.all(), prefix="reference"
    )
    signoff_formset = SignOffFormSet(
        request.POST, queryset=codelist.signoffs.all(), prefix="signoff"
    )
    codelist_form.is_valid()
    if (
        codelist_form.is_valid()
        and reference_formset.is_valid()
        and signoff_formset.is_valid()
    ):
        return handle_valid(
            request,
            codelist,
            codelist_form,
            reference_formset,
            signoff_formset,
            owner_choices,
        )
    else:
        return handle_invalid(
            request, codelist_form, reference_formset, signoff_formset, owner_choices
        )