public int compareLefts(RowSegment<E> other) {
		// first, just check the rows of this segment and the other, if the rows are
		// not the same, then one column clearly above the other.

		int result = getRow() - other.getRow();
		if (result != 0) {
			return result;
		}

		// We are in the same grid row, so the order is determined by the segment at the
		// left of the column. There are 2 possible orientations for the left column. 1) it can
		// extend upwards from our row, or it can extend downwards from our row.
		// If our left orientation is not the same as the other row segment, the order is
		// simply UP < DOWN in order to reduce edge crossings. Edges on the top
		// go up and edges on the bottom go down, so they won't cross each other.
		ColumnOrientation myLeftColOrientation = getOrientationForLeftColumn();
		ColumnOrientation otherLeftColOrientation = other.getOrientationForLeftColumn();

		// if they are not the same, then UP < DOWN
		if (myLeftColOrientation != otherLeftColOrientation) {
			return myLeftColOrientation.compareTo(otherLeftColOrientation);
		}

		// Both this segment's left and the other segment's left have the same orientation. 
		// Compare the left column segments and use those results to determine our ordering 
		// top to bottom. If the left columns extend upward, then which ever column is left most 
		// (lower value), should have it's associated row lower spatially (higher row value)
		// Keeping left most columns(lower value) as lower rows allows their shape to avoid being
		// crossed by the wider shape, which will be lower.
		// 
		// And if the left rows extends downwards, the inverse applies.	
		ColumnSegment<E> myLeftColSegment = getLeftColSegment();
		ColumnSegment<E> otherLeftColSegment = other.getLeftColSegment();

		if (myLeftColOrientation == ColumnOrientation.UP) {
			return -myLeftColSegment.compareTops(otherLeftColSegment);
		}
		return myLeftColSegment.compareBottoms(otherLeftColSegment);
	}
Compares row segments strictly based  on the relationship of the connected column segments 
at the left of these segments. 
@param other the other row segment to compare
@return  a negative integer, zero, or a positive integer as this object
         is less than, equal to, or greater than the specified object.
Ghidra/Features/FunctionGraph/src/main/java/ghidra/app/plugin/core/functiongraph/graph/layout/flowchart/RowSegment.java