<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def quarter_ellipsis_functions(xx, yy):
 """ Method that creates two quarter-ellipse functions based on points xx and yy. The ellipsis is supposed to be aligned with the axes. The two ellipsis pass through the two points xx and yy. Args: xx: First point yy: Second point Returns: A dictionary with the lower and upper quarter ellipsis functions. """

    npxx = np.array(xx)
    npyy = np.array(yy)
    if np.any(npxx == npyy):
        raise RuntimeError('Invalid points for quarter_ellipsis_functions')
    if np.all(npxx < npyy) or np.all(npxx > npyy):
        if npxx[0] < npyy[0]:
            p1 = npxx
            p2 = npyy
        else:
            p1 = npyy
            p2 = npxx
        c_lower = np.array([p1[0], p2[1]])
        c_upper = np.array([p2[0], p1[1]])
        b2 = (p2[1] - p1[1]) ** 2
    else:
        if npxx[0] < npyy[0]:
            p1 = npxx
            p2 = npyy
        else:
            p1 = npyy
            p2 = npxx
        c_lower = np.array([p2[0], p1[1]])
        c_upper = np.array([p1[0], p2[1]])
        b2 = (p1[1] - p2[1]) ** 2
    b2overa2 = b2 / (p2[0] - p1[0]) ** 2

    def lower(x):
        return c_lower[1] - np.sqrt(b2 - b2overa2 * (x - c_lower[0]) ** 2)

    def upper(x):
        return c_upper[1] + np.sqrt(b2 - b2overa2 * (x - c_upper[0]) ** 2)

    return {'lower': lower, 'upper': upper}