static <T> T assertAtMostOne(Iterable<T> col) {
		Iterator<T> it = col.iterator();
		if (!it.hasNext()) {
			return null;
		}
		T result = it.next();
		if (it.hasNext()) {
			throw new AssertionError("Expected at most one. Got many.");
		}
		return result;
	}
Assert that at most one element is in an iterable and get that element or {@code null}

@param <T> the type of element
@param col the iterable
@return the element or {@code null} if empty
@throws AssertionError if many elements exist in the iterable
Ghidra/Framework/Emulation/src/main/java/generic/Unique.java