code: public void setSharedSlot(SharedSlot newSlot) {
  		checkNotNull(newSlot);
  
  		if (this.sharedSlot == null) {
  			this.sharedSlot = newSlot;
  		}
  		else if (newSlot != this.sharedSlot){
  			if (lockedLocation != null && !Objects.equals(lockedLocation, newSlot.getTaskManagerLocation())) {
  				throw new IllegalArgumentException(
  						"Cannot assign different location to a constraint whose location is locked.");
  			}
  			if (this.sharedSlot.isAlive()) {
  				this.sharedSlot.releaseSlot(new FlinkException("Setting new shared slot for co-location constraint."));
  			}
  
  			this.sharedSlot = newSlot;
  		}
  	}
docs: Assigns a new shared slot to this co-location constraint. The shared slot
  will hold the subtasks that are executed under this co-location constraint.
  If the constraint's location is assigned, then this slot needs to be from
  the same location (instance) as the one assigned to this constraint.
  
  <p>If the constraint already has a slot, the current one will be released.</p>
  
  @param newSlot The new shared slot to assign to this constraint.
  @throws IllegalArgumentException If the constraint's location has been assigned and
  the new slot is from a different location.