def overlap_bbox_and_point(bbox, xp, yp):
cx, cy = get_midpoint(bbox)<EOL>dir_x = np.sign(cx-xp)<EOL>dir_y = np.sign(cy-yp)<EOL>if dir_x == -<NUM_LIT:1>:<EOL><INDENT>dx = xp - bbox.xmax<EOL><DEDENT>elif dir_x == <NUM_LIT:1>:<EOL><INDENT>dx = xp - bbox.xmin<EOL><DEDENT>else:<EOL><INDENT>dx = <NUM_LIT:0><EOL><DEDENT>if dir_y == -<NUM_LIT:1>:<EOL><INDENT>dy = yp - bbox.ymax<EOL><DEDENT>elif dir_y == <NUM_LIT:1>:<EOL><INDENT>dy = yp - bbox.ymin<EOL><DEDENT>else:<EOL><INDENT>dy = <NUM_LIT:0><EOL><DEDENT>return dx, dy<EOL>
Given a bbox that contains a given point, return the (x, y) displacement
    necessary to make the bbox not overlap the point.