def METHOD_NAME(p1, p2, p3):
    # Slope of line segment (p1, p2): σ = (y2 - y1)/(x2 - x1)
    # Slope of line segment (p2, p3): τ = (y3 - y2)/(x3 - x2)
    #
    # If  σ > τ, the orientation is clockwise (right turn)
    #
    # Using above values of σ and τ, we can conclude that,
    # the orientation depends on sign of  below expression:
    #
    # (y2 - y1)*(x3 - x2) - (y3 - y2)*(x2 - x1)
    #
    # Above expression is negative when σ < τ, i.e.,  counterclockwise
    val = (float(p2.y - p1.y) * (p3.x - p2.x)) - (float(p2.x - p1.x) * (p3.y - p2.y))
    if val > 0:
        # Clockwise orientation
        return 1
    elif val < 0:
        # Counterclockwise orientation
        return 2
    else:
        # Collinear orientation
        return 0