def METHOD_NAME():
    models = [
        SortModel(id=1, name="Alice", sort_order=0),
        SortModel(id=2, name="Al", sort_order=1),
        SortModel(id=3, name="Zake", sort_order=1),
        SortModel(id=4, name="Will", sort_order=0),
        SortModel(id=5, name="Al", sort_order=2),
        SortModel(id=6, name="Alice", sort_order=2),
    ]
    orders_by = {"name": "asc", "none": {}, "sort_order": "desc"}
    models = sort_models(models, orders_by)
    assert models[5].name == "Zake"
    assert models[0].name == "Al"
    assert models[1].name == "Al"
    assert [model.id for model in models] == [5, 2, 6, 1, 4, 3]
    orders_by = {"name": "asc", "none": set("aa"), "id": "asc"}
    models = sort_models(models, orders_by)
    assert [model.id for model in models] == [2, 5, 1, 6, 4, 3]
    orders_by = {"sort_order": "asc", "none": ..., "id": "asc", "uu": 2, "aa": None}
    models = sort_models(models, orders_by)
    assert [model.id for model in models] == [1, 4, 2, 3, 5, 6]