def corner_list(bb_json):
    """Takes a boundingBox value from Google vision's JSON output and returns
    a condensed version, in the form [x y x y x y x y], with the first x, y
    pair representing the upper left corner."""
    corners = []
    for index in [0, 1, 2, 3]:
        if 'x' in bb_json[index] and 'y' in bb_json[index]:
            corners.append(bb_json[index]['x'])
            corners.append(bb_json[index]['y'])
        else:
            return []
    return corners
