code: func (c *Cluster) GetNetworks(filter filters.Args) ([]apitypes.NetworkResource, error) {
  	var f *swarmapi.ListNetworksRequest_Filters
  
  	if filter.Len() > 0 {
  		f = &swarmapi.ListNetworksRequest_Filters{}
  
  		if filter.Contains("name") {
  			f.Names = filter.Get("name")
  			f.NamePrefixes = filter.Get("name")
  		}
  
  		if filter.Contains("id") {
  			f.IDPrefixes = filter.Get("id")
  		}
  	}
  
  	list, err := c.getNetworks(f)
  	if err != nil {
  		return nil, err
  	}
  	filterPredefinedNetworks(&list)
  
  	return internalnetwork.FilterNetworks(list, filter)
  }
docs: // GetNetworks returns all current cluster managed networks.