code: public void prune(
  			Collection<ComputationState> matchesToPrune,
  			Collection<Map<String, List<EventId>>> matchedResult,
  			SharedBufferAccessor<?> sharedBufferAccessor) throws Exception {
  
  		EventId pruningId = getPruningId(matchedResult);
  		if (pruningId != null) {
  			List<ComputationState> discardStates = new ArrayList<>();
  			for (ComputationState computationState : matchesToPrune) {
  				if (computationState.getStartEventID() != null &&
  					shouldPrune(computationState.getStartEventID(), pruningId)) {
  					sharedBufferAccessor.releaseNode(computationState.getPreviousBufferEntry());
  					discardStates.add(computationState);
  				}
  			}
  			matchesToPrune.removeAll(discardStates);
  		}
  	}
docs: Prunes matches/partial matches based on the chosen strategy.
  
  @param matchesToPrune current partial matches
  @param matchedResult  already completed matches
  @param sharedBufferAccessor   accessor to corresponding shared buffer
  @throws Exception thrown if could not access the state