code: func validateProfile(profile string, loadedProfiles map[string]bool) error {
  	if err := ValidateProfileFormat(profile); err != nil {
  		return err
  	}
  
  	if strings.HasPrefix(profile, ProfileNamePrefix) {
  		profileName := strings.TrimPrefix(profile, ProfileNamePrefix)
  		if !loadedProfiles[profileName] {
  			return fmt.Errorf("profile %q is not loaded", profileName)
  		}
  	}
  
  	return nil
  }
docs: // Verify that the profile is valid and loaded.