code: func (c *controllerCommon) DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) {
  	attached := make(map[string]bool)
  	for _, diskName := range diskNames {
  		attached[diskName] = false
  	}
  
  	disks, err := c.getNodeDataDisks(nodeName)
  	if err != nil {
  		if err == cloudprovider.InstanceNotFound {
  			// if host doesn't exist, no need to detach
  			klog.Warningf("azureDisk - Cannot find node %q, DisksAreAttached will assume disks %v are not attached to it.",
  				nodeName, diskNames)
  			return attached, nil
  		}
  
  		return attached, err
  	}
  
  	for _, disk := range disks {
  		for _, diskName := range diskNames {
  			if disk.Name != nil && diskName != "" && *disk.Name == diskName {
  				attached[diskName] = true
  			}
  		}
  	}
  
  	return attached, nil
  }
docs: // DisksAreAttached checks if a list of volumes are attached to the node with the specified NodeName.