def bbox_rot90(bbox, factor, rows, cols):
if factor < <NUM_LIT:0> or factor > <NUM_LIT:3>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>x_min, y_min, x_max, y_max = bbox<EOL>if factor == <NUM_LIT:1>:<EOL><INDENT>bbox = [y_min, <NUM_LIT:1> - x_max, y_max, <NUM_LIT:1> - x_min]<EOL><DEDENT>if factor == <NUM_LIT:2>:<EOL><INDENT>bbox = [<NUM_LIT:1> - x_max, <NUM_LIT:1> - y_max, <NUM_LIT:1> - x_min, <NUM_LIT:1> - y_min]<EOL><DEDENT>if factor == <NUM_LIT:3>:<EOL><INDENT>bbox = [<NUM_LIT:1> - y_max, x_min, <NUM_LIT:1> - y_min, x_max]<EOL><DEDENT>return bbox<EOL>
Rotates a bounding box by 90 degrees CCW (see np.rot90)

    Args:
        bbox (tuple): A tuple (x_min, y_min, x_max, y_max).
        factor (int): Number of CCW rotations. Must be in range [0;3] See np.rot90.
        rows (int): Image rows.
        cols (int): Image cols.