def METHOD_NAME():
    api1 = MagicMock(base_path="/")
    api2 = MagicMock(base_path="/basepath")
    assert utils.sort_apis_by_basepath([api1, api2]) == [api2, api1]
    api3 = MagicMock(base_path="/basepath/v2")
    assert utils.sort_apis_by_basepath([api1, api2, api3]) == [api3, api2, api1]
    api4 = MagicMock(base_path="/healthz")
    assert utils.sort_apis_by_basepath([api1, api2, api3, api4]) == [
        api3,
        api2,
        api4,
        api1,
    ]