code: func (d *driver) Leave(nid, eid string) error {
  	defer osl.InitOSContext()()
  
  	network, err := d.getNetwork(nid)
  	if err != nil {
  		return types.InternalMaskableErrorf("%s", err)
  	}
  
  	endpoint, err := network.getEndpoint(eid)
  	if err != nil {
  		return err
  	}
  
  	if endpoint == nil {
  		return EndpointNotFoundError(eid)
  	}
  
  	if !network.config.EnableICC {
  		if err = d.link(network, endpoint, false); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Leave method is invoked when a Sandbox detaches from an endpoint.