code: def orientation(point_p, point_q, point_r):
      
      # Set https://www.geeksforgeeks.org/orientation-3-ordered-points/
      # for details of below formula.
      r = ((point_q.y - point_p.y) * (point_r.x - point_q.x) -
           (point_q.x - point_p.x) * (point_r.y - point_q.y))
      if r == 0:
          return 0
      return 1 if r > 0 else 2
docs: To find orientation of ordered triplet (p, q, r).
  
      :param point_p:
      :type point_p: models.Point
      :param point_q:
      :type point_q: models.Point
      :param point_r:
      :type point_r: models.Point
      :return: 0: p, q and r are colinear
               1: clockwise
               2: counterclockwise
      :rtype: int