code: func (d *driver) Leave(nid, eid string) error {
  	network, err := d.getNetwork(nid)
  	if err != nil {
  		return types.InternalMaskableErrorf("%s", err)
  	}
  
  	// Ensure that the endpoint exists
  	endpoint, err := network.getEndpoint(eid)
  	if err != nil {
  		return err
  	}
  
  	err = hcsshim.HotDetachEndpoint(endpoint.sandboxID, endpoint.profileID)
  	if err != nil {
  		// If container doesn't exists in hcs, do not throw error for hot add/remove
  		if err != hcsshim.ErrComputeSystemDoesNotExist {
  			return err
  		}
  	}
  	return nil
  }
docs: // Leave method is invoked when a Sandbox detaches from an endpoint.