code: func DownloadCerts(client clientset.Interface, cfg *kubeadmapi.InitConfiguration, key string) error {
  	fmt.Printf("[download-certs] Downloading the certificates in Secret %q in the %q Namespace\n", kubeadmconstants.KubeadmCertsSecret, metav1.NamespaceSystem)
  
  	decodedKey, err := hex.DecodeString(key)
  	if err != nil {
  		return errors.Wrap(err, "error decoding certificate key")
  	}
  
  	secret, err := getSecret(client)
  	if err != nil {
  		return errors.Wrap(err, "error downloading the secret")
  	}
  
  	secretData, err := getDataFromSecret(secret, decodedKey)
  	if err != nil {
  		return errors.Wrap(err, "error decoding secret data with provided key")
  	}
  
  	for certOrKeyName, certOrKeyPath := range certsToTransfer(cfg) {
  		certOrKeyData, found := secretData[certOrKeyNameToSecretName(certOrKeyName)]
  		if !found {
  			return errors.Errorf("the Secret does not include the required certificate or key - name: %s, path: %s", certOrKeyName, certOrKeyPath)
  		}
  		if len(certOrKeyData) == 0 {
  			klog.V(1).Infof("[download-certs] Not saving %q to disk, since it is empty in the %q Secret\n", certOrKeyName, kubeadmconstants.KubeadmCertsSecret)
  			continue
  		}
  		if err := writeCertOrKey(certOrKeyPath, certOrKeyData); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // DownloadCerts downloads the certificates needed to join a new control plane.