def _bbox_area(box):
    """Calculate the area of a box.

    Args:
        box: tensor of box coordinates (x1, y1, x2, y2)

    Returns:
        The area of the box
    """
    return (box[2] - box[0]) * (box[3] - box[1])
