func filterNetworks(candidates []*api.Network, filters ...func(*api.Network) bool) []*api.Network {
    result := []*api.Network{}

    for _, c := range candidates {
        match := true