code: func (config *serviceConfig) LoadAllowNondistributableArtifacts(registries []string) error {
  	cidrs := map[string]*registrytypes.NetIPNet{}
  	hostnames := map[string]bool{}
  
  	for _, r := range registries {
  		if _, err := ValidateIndexName(r); err != nil {
  			return err
  		}
  		if validateNoScheme(r) != nil {
  			return fmt.Errorf("allow-nondistributable-artifacts registry %s should not contain '://'", r)
  		}
  
  		if _, ipnet, err := net.ParseCIDR(r); err == nil {
  			// Valid CIDR.
  			cidrs[ipnet.String()] = (*registrytypes.NetIPNet)(ipnet)
  		} else if err := validateHostPort(r); err == nil {
  			// Must be `host:port` if not CIDR.
  			hostnames[r] = true
  		} else {
  			return fmt.Errorf("allow-nondistributable-artifacts registry %s is not valid: %v", r, err)
  		}
  	}
  
  	config.AllowNondistributableArtifactsCIDRs = make([]*(registrytypes.NetIPNet), 0)
  	for _, c := range cidrs {
  		config.AllowNondistributableArtifactsCIDRs = append(config.AllowNondistributableArtifactsCIDRs, c)
  	}
  
  	config.AllowNondistributableArtifactsHostnames = make([]string, 0)
  	for h := range hostnames {
  		config.AllowNondistributableArtifactsHostnames = append(config.AllowNondistributableArtifactsHostnames, h)
  	}
  
  	return nil
  }
docs: // LoadAllowNondistributableArtifacts loads allow-nondistributable-artifacts registries into config.