code: func (g *Cloud) DisksAreAttached(diskNames []string, nodeName types.NodeName) (map[string]bool, error) {
  	attached := make(map[string]bool)
  	for _, diskName := range diskNames {
  		attached[diskName] = false
  	}
  	instanceName := mapNodeNameToInstanceName(nodeName)
  	instance, err := g.getInstanceByName(instanceName)
  	if err != nil {
  		if err == cloudprovider.InstanceNotFound {
  			// If instance no longer exists, safe to assume volume is not attached.
  			klog.Warningf(
  				"Instance %q does not exist. DisksAreAttached will assume PD %v are not attached to it.",
  				instanceName,
  				diskNames)
  			return attached, nil
  		}
  
  		return attached, err
  	}
  
  	for _, instanceDisk := range instance.Disks {
  		for _, diskName := range diskNames {
  			if instanceDisk.DeviceName == diskName {
  				// Disk is still attached to node
  				attached[diskName] = true
  			}
  		}
  	}
  
  	return attached, nil
  }
docs: // DisksAreAttached is a batch function to check if a list of disks are attached
  // to the node with the specified NodeName.