def get_rect_xmax(data):
 return max(data[0][0], data[1][0], data[2][0], data[3][0])

def get_rect_xmax ( data ) : return max ( data [ 0 ] [ 0 ] , data [ 1 ] [ 0 ] , data [ 2 ] [ 0 ] , data [ 3 ] [ 0 ] )
find maximum x value from four vertices .