code: 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])
  
      if val == 0:
          return 0  # collinear
      elif val > 0:
          return 1  # clockwise
      else:
          return 2
docs: 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