def bbox_rotate(bbox, angle, rows, cols, interpolation):
scale = cols / float(rows)<EOL>x = np.array([bbox[<NUM_LIT:0>], bbox[<NUM_LIT:2>], bbox[<NUM_LIT:2>], bbox[<NUM_LIT:0>]])<EOL>y = np.array([bbox[<NUM_LIT:1>], bbox[<NUM_LIT:1>], bbox[<NUM_LIT:3>], bbox[<NUM_LIT:3>]])<EOL>x = x - <NUM_LIT:0.5><EOL>y = y - <NUM_LIT:0.5><EOL>angle = np.deg2rad(angle)<EOL>x_t = (np.cos(angle) * x * scale + np.sin(angle) * y) / scale<EOL>y_t = (-np.sin(angle) * x * scale + np.cos(angle) * y)<EOL>x_t = x_t + <NUM_LIT:0.5><EOL>y_t = y_t + <NUM_LIT:0.5><EOL>return [min(x_t), min(y_t), max(x_t), max(y_t)]<EOL>
Rotates a bounding box by angle degrees

    Args:
        bbox (tuple): A tuple (x_min, y_min, x_max, y_max).
        angle (int): Angle of rotation in degrees
        rows (int): Image rows.
        cols (int): Image cols.
        interpolation (int): interpolation method.

        return a tuple (x_min, y_min, x_max, y_max)