human
I wrote the below code

    p1 = line0[0]
    p2 = line0[1]
    p3 = line1[0]
    p4 = line1[1]
    def mag(p):
        return np.sqrt(p.dot(p))
    def normalise(p1, p2):
        p = (p2 - p1)
        m = mag(p)
        if (m == 0):
            return [0.0, 0.0, 0.0]
        else:
            return (p / m)
    d1 = normalise(p1, p2)
    d2 = normalise(p3, p4)
    diff = (p1 - p3)
    a01 = (- d1.dot(d2))
    b0 = diff.dot(d1)
    if (np.abs(a01) < 1.0):
        det = (1.0 - (a01 * a01))
        b1 = (- diff.dot(d2))
        s0 = (((a01 * b1) - b0) / det)
        s1 = (((a01 * b0) - b1) / det)
    else:
        s0 = (- b0)
        s1 = 0
    closestPoint1 = (p1 + (s0 * d1))
    closestPoint2 = (p3 + (s1 * d2))
    dist = mag((closestPoint2 - closestPoint1))
    return (closestPoint1, closestPoint2, dist)

What's a good function header?

Here's a good function header?
assistant
#Here's a good function header.

def nearest_intersection_points(line0, line1):