def METHOD_NAME(
    api_client,
    minimal_event_dict,
    has_consent,
    has_personal_information,
):
    """Check that external user consent is required if personal information fields
    are filled.
    Admin users validate fields only when publishing, so consent not required on drafts.
    """
    minimal_event_dict["publication_status"] = "draft"
    del minimal_event_dict["publisher"]
    if has_consent:
        minimal_event_dict["user_consent"] = True
    if has_personal_information:
        minimal_event_dict["user_name"] = "User name"
        minimal_event_dict["maximum_attendee_capacity"] = 5
        minimal_event_dict["user_email"] = "email@example.com"
        minimal_event_dict["user_phone_number"] = "0501234567"
    user = UserFactory()
    api_client.force_authenticate(user=user)
    create_url = versioned_reverse("event-list")
    response = api_client.post(create_url, minimal_event_dict, format="json")
    if has_personal_information and not has_consent:
        assert "user_consent" in response.json()
        assert response.status_code == status.HTTP_400_BAD_REQUEST, str(
            response.content
        )
    elif not has_personal_information:
        # External user needs to give personal information
        assert response.status_code == status.HTTP_400_BAD_REQUEST, str(
            response.content
        )
    else:
        assert response.status_code == status.HTTP_201_CREATED, str(response.content)