code: func (s *ImportHelper) Validate() error {
  	// validate nested space template
  	if err := s.Template.Validate(); err != nil {
  		return errs.Wrap(err, "failed to validate space template")
  	}
  
  	// Ensure all artifacts have the correct space template ID set and are
  	// valid
  	for _, wit := range s.WITs {
  		if wit.SpaceTemplateID != s.Template.ID {
  			return errors.NewBadParameterError("work item types's space template ID", wit.SpaceTemplateID.String()).Expected(s.Template.ID.String())
  		}
  		if err := wit.Validate(); err != nil {
  			return errs.Wrapf(err, `failed to validate work item type "%s" (ID=%s)`, wit.Name, wit.ID)
  		}
  	}
  	for _, wilt := range s.WILTs {
  		if wilt.SpaceTemplateID != s.Template.ID {
  			return errors.NewBadParameterError("work item link type's space template ID", wilt.SpaceTemplateID.String()).Expected(s.Template.ID.String())
  		}
  	}
  	for _, witg := range s.WITGs {
  		if witg.SpaceTemplateID != s.Template.ID {
  			return errors.NewBadParameterError("work item type group's space template ID", witg.SpaceTemplateID.String()).Expected(s.Template.ID.String())
  		}
  	}
  	for _, wibs := range s.WIBs {
  		if wibs.SpaceTemplateID != s.Template.ID {
  			return errors.NewBadParameterError("work item board's space template ID", wibs.SpaceTemplateID.String()).Expected(s.Template.ID.String())
  		}
  	}
  
  	return nil
  }
docs: // Validate ensures that all inner-document references of the given space
  // template are fine.