code: func LoadNetworks(source map[string]interface{}, version string) (map[string]types.NetworkConfig, error) {
  	networks := make(map[string]types.NetworkConfig)
  	err := Transform(source, &networks)
  	if err != nil {
  		return networks, err
  	}
  	for name, network := range networks {
  		if !network.External.External {
  			continue
  		}
  		switch {
  		case network.External.Name != "":
  			if network.Name != "" {
  				return nil, errors.Errorf("network %s: network.external.name and network.name conflict; only use network.name", name)
  			}
  			if versions.GreaterThanOrEqualTo(version, "3.5") {
  				logrus.Warnf("network %s: network.external.name is deprecated in favor of network.name", name)
  			}
  			network.Name = network.External.Name
  			network.External.Name = ""
  		case network.Name == "":
  			network.Name = name
  		}
  		network.Extras = loadExtras(name, source)
  		networks[name] = network
  	}
  	return networks, nil
  }
docs: // LoadNetworks produces a NetworkConfig map from a compose file Dict
  // the source Dict is not validated if directly used. Use Load() to enable validation