code: func (gce *Cloud) DetachDisk(devicePath string, nodeName types.NodeName) error {
  	instanceName := mapNodeNameToInstanceName(nodeName)
  	inst, err := gce.getInstanceByName(instanceName)
  	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. DetachDisk will assume PD %q is not attached to it.",
  				instanceName,
  				devicePath)
  			return nil
  		}
  
  		return fmt.Errorf("error getting instance %q", instanceName)
  	}
  
  	detachOp, err := gce.service.Instances.DetachDisk(gce.projectID, inst.Zone, inst.Name, devicePath).Do()
  	if err != nil {
  		return err
  	}
  
  	return gce.waitForZoneOp(detachOp, inst.Zone)
  }
docs: // DetachDisk detaches a disk