code: func (attacher *photonPersistentDiskAttacher) Attach(spec *volume.Spec, nodeName types.NodeName) (string, error) {
  	hostName := string(nodeName)
  	volumeSource, _, err := getVolumeSource(spec)
  	if err != nil {
  		klog.Errorf("Photon Controller attacher: Attach failed to get volume source")
  		return "", err
  	}
  	attached, err := attacher.photonDisks.DiskIsAttached(context.TODO(), volumeSource.PdID, nodeName)
  
  	if err != nil {
  		klog.Warningf("Photon Controller: couldn't check if disk is Attached for host %s, will try attach disk: %+v", hostName, err)
  		attached = false
  	}
  
  	if !attached {
  		klog.V(4).Infof("Photon Controller: Attach disk called for host %s", hostName)
  
  		err = attacher.photonDisks.AttachDisk(context.TODO(), volumeSource.PdID, nodeName)
  		if err != nil {
  			klog.Errorf("Error attaching volume %q to node %q: %+v", volumeSource.PdID, nodeName, err)
  			return "", err
  		}
  	}
  
  	PdidWithNoHypens := strings.Replace(volumeSource.PdID, "-", "", -1)
  	return filepath.Join(diskByIDPath, diskPhotonPrefix+PdidWithNoHypens), nil
  }
docs: // Attaches the volume specified by the given spec to the given host.
  // On success, returns the device path where the device was attached on the
  // node.
  // Callers are responsible for retryinging on failure.
  // Callers are responsible for thread safety between concurrent attach and
  // detach operations.