def _non_projective(u, v, w, x):
    """ Checks if an edge pair is non-projective """
    mnu = min(u, v)
    mxu = max(u, v)
    mnw = min(w, x)
    mxw = max(w, x)
    if mnu < mnw:
        return (mxu < mxw) and (mxu > mnw)
    elif mxu > mxw:
        return (mnu > mnw) and (mnu < mxw)