code: func LoadVolumes(source map[string]interface{}, version string) (map[string]types.VolumeConfig, error) {
  	volumes := make(map[string]types.VolumeConfig)
  	if err := Transform(source, &volumes); err != nil {
  		return volumes, err
  	}
  
  	for name, volume := range volumes {
  		if !volume.External.External {
  			continue
  		}
  		switch {
  		case volume.Driver != "":
  			return nil, externalVolumeError(name, "driver")
  		case len(volume.DriverOpts) > 0:
  			return nil, externalVolumeError(name, "driver_opts")
  		case len(volume.Labels) > 0:
  			return nil, externalVolumeError(name, "labels")
  		case volume.External.Name != "":
  			if volume.Name != "" {
  				return nil, errors.Errorf("volume %s: volume.external.name and volume.name conflict; only use volume.name", name)
  			}
  			if versions.GreaterThanOrEqualTo(version, "3.4") {
  				logrus.Warnf("volume %s: volume.external.name is deprecated in favor of volume.name", name)
  			}
  			volume.Name = volume.External.Name
  			volume.External.Name = ""
  		case volume.Name == "":
  			volume.Name = name
  		}
  		volume.Extras = loadExtras(name, source)
  		volumes[name] = volume
  	}
  	return volumes, nil
  }
docs: // LoadVolumes produces a VolumeConfig map from a compose file Dict
  // the source Dict is not validated if directly used. Use Load() to enable validation