code: func (c *Cloud) DiskIsAttached(diskName KubernetesVolumeID, nodeName types.NodeName) (bool, error) {
  	_, instance, err := c.getFullInstance(nodeName)
  	if err != nil {
  		if err == cloudprovider.ErrInstanceNotFound {
  			// If instance no longer exists, safe to assume volume is not attached.
  			glog.Warningf(
  				"Instance %q does not exist. DiskIsAttached will assume disk %q is not attached to it.",
  				nodeName,
  				diskName)
  			return false, nil
  		}
  
  		return false, err
  	}
  
  	diskID, err := diskName.mapToAWSVolumeID()
  	if err != nil {
  		return false, fmt.Errorf("error mapping volume spec %q to aws id: %v", diskName, err)
  	}
  
  	for _, blockDevice := range instance.BlockDeviceMappings {
  		id := awsVolumeID(aws.StringValue(blockDevice.Ebs.VolumeId))
  		if id == diskID {
  			return true, nil
  		}
  	}
  	return false, nil
  }
docs: // DiskIsAttached implements Volumes.DiskIsAttached