def merge(l1, l2):
x1, y1, x2, y2 = l1<EOL>xx1, yy1, xx2, yy2 = l2<EOL>comb = ((x1, y1, xx1, yy1),<EOL>(x1, y1, xx2, yy2),<EOL>(x2, y2, xx1, yy1),<EOL>(x2, y2, xx2, yy2))<EOL>d = [length(c) for c in comb]<EOL>i = argmax(d)<EOL>dist = d[i]<EOL>mid = middle(comb[i])<EOL>a = (angle(l1) + angle(l2)) * <NUM_LIT:0.5><EOL>return fromAttr(mid, a, dist)<EOL>
merge 2 lines together