def _is_in_box(coord, bound_box):
    """
    Check whether a coordinate is inside a bounded box
    """
    [x, y] = coord
    [[x_min, y_min], [x_max, y_max]] = bound_box
    return (x_min <= x <= x_max) and (y_min <= y <= y_max)