def line_from_two_points(x1, y1, x2, y2):
    """
    
    Helper function to return the equation of a line
    passing through any two points.

    :Parameters:

    x1: float
        X coordinate of first point
    y1: float
        Y coordinate of first point
    x2: float
        X coordinate of second point
    y2: float
        Y coordinate of second point
    
    :Returns:
    
    (slope, intercept) or (None, xposition) if the slope is infinite.
    
    """
    xdiff = (x2-x1)
    if abs(xdiff) > 0.0:
        ydiff = (y2-y1)
        slope = ydiff / xdiff
        intercept = y1 - slope * x1
        return (slope, intercept)
    else:
        return (None, x1)