code: func IsIngressNetwork(nw *api.Network) bool {
  	if nw.Spec.Ingress {
  		return true
  	}
  	// Check if legacy defined ingress network
  	_, ok := nw.Spec.Annotations.Labels["com.docker.swarm.internal"]
  	return ok && nw.Spec.Annotations.Name == "ingress"
  }
docs: // IsIngressNetwork check if the network is an ingress network