def orientation(p1, p2, p3):
val = (p2[consts.Consts.y] - p1[consts.Consts.y]) * (p3[consts.Consts.x] - p2[consts.Consts.x])- (p2[consts.Consts.x] - p1[consts.Consts.x]) * (p3[consts.Consts.y] - p2[consts.Consts.y])<EOL>if val == <NUM_LIT:0>:<EOL><INDENT>return <NUM_LIT:0>  <EOL><DEDENT>elif val > <NUM_LIT:0>:<EOL><INDENT>return <NUM_LIT:1>  <EOL><DEDENT>else:<EOL><INDENT>return <NUM_LIT:2><EOL><DEDENT>
Finds orientation of three points p1, p2, p3.
The function returns following values
0 --> p1, p2 and p3 are collinear
1 --> Clockwise
2 --> Counterclockwise
:param p1: tuple representing two dimensional point
:param p2: tuple representing two dimensional point
:param p3: tuple representing two dimensional point