code: @Nullable
  	private PendingRequest removePendingRequest(SlotRequestId requestId) {
  		PendingRequest result = waitingForResourceManager.remove(requestId);
  
  		if (result != null) {
  			// sanity check
  			assert !pendingRequests.containsKeyA(requestId) : "A pending requests should only be part of either " +
  				"the pendingRequests or waitingForResourceManager but not both.";
  
  			return result;
  		} else {
  			return pendingRequests.removeKeyA(requestId);
  		}
  	}
docs: Checks whether there exists a pending request with the given slot request id and removes it
  from the internal data structures.
  
  @param requestId identifying the pending request
  @return pending request if there is one, otherwise null