def mergeBboxes(bbox1, bbox2):
if isContained(bbox1, bbox2):<EOL><INDENT>return bbox2<EOL><DEDENT>elif isContained(bbox2, bbox1):<EOL><INDENT>return bbox1<EOL><DEDENT>else:<EOL><INDENT>return (<EOL>min(bbox1[<NUM_LIT:0>], bbox2[<NUM_LIT:0>]),<EOL>min(bbox1[<NUM_LIT:1>], bbox2[<NUM_LIT:1>]),<EOL>max(bbox1[<NUM_LIT:2>], bbox2[<NUM_LIT:2>]),<EOL>max(bbox1[<NUM_LIT:3>], bbox2[<NUM_LIT:3>]),<EOL>)<EOL><DEDENT>
:param bbox1: (top, left, bottom, right)
:param bbox2: (top, left, bottom, right)
:return: Merge bounding boxes