def keypoint_rot90(keypoint, factor, rows, cols, **params):
if factor < <NUM_LIT:0> or factor > <NUM_LIT:3>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>x, y, angle, scale = keypoint<EOL>if factor == <NUM_LIT:1>:<EOL><INDENT>keypoint = [y, (cols - <NUM_LIT:1>) - x, angle - math.pi / <NUM_LIT:2>, scale]<EOL><DEDENT>if factor == <NUM_LIT:2>:<EOL><INDENT>keypoint = [(cols - <NUM_LIT:1>) - x, (rows - <NUM_LIT:1>) - y, angle - math.pi, scale]<EOL><DEDENT>if factor == <NUM_LIT:3>:<EOL><INDENT>keypoint = [(rows - <NUM_LIT:1>) - y, x, angle + math.pi / <NUM_LIT:2>, scale]<EOL><DEDENT>return keypoint<EOL>
Rotates a keypoint by 90 degrees CCW (see np.rot90)

    Args:
        keypoint (tuple): A tuple (x, y, angle, scale).
        factor (int): Number of CCW rotations. Must be in range [0;3] See np.rot90.
        rows (int): Image rows.
        cols (int): Image cols.