code: func (m CertificateMap) CertTree() (CertificateTree, error) {
  	caMap := make(CertificateTree)
  
  	for _, cert := range m {
  		if cert.CAName == "" {
  			if _, ok := caMap[cert]; !ok {
  				caMap[cert] = []*KubeadmCert{}
  			}
  		} else {
  			ca, ok := m[cert.CAName]
  			if !ok {
  				return nil, errors.Errorf("certificate %q references unknown CA %q", cert.Name, cert.CAName)
  			}
  			caMap[ca] = append(caMap[ca], cert)
  		}
  	}
  
  	return caMap, nil
  }
docs: // CertTree returns a one-level-deep tree, mapping a CA cert to an array of certificates that should be signed by it.