def _area(bbox):
    """Computes area of a 2D bounding box.
    
    Args:
        bbox: A dict with keys 'x1', 'x2', 'y1', 'y2' encoding spatial
            co-ordinates.
    
    Returns:
        The area of the bounding box.
    """
    return (bbox['x2'] - bbox['x1']) * (bbox['y2'] - bbox['y1'])
