(u, w, a, b)
return sqrt(dot((u_1, u_2), (u_1, u_2), w, a, b))
Returns the norm of the vector `u = (u_{1}, u_{2})` under the dot product
    defined by `u \cdot v = (wu_{1} + bu_{2})(w*v_{1} + bv_{2}) + |a|*u_{1}*v_{1}`
    where `u = (u_{1}, u_{2})` and `v = (v_{1}, v_{2})`.
Returns the norm of the vector `u = (u_{1}, u_{2})` under the dot product
    defined by `u \cdot v = (wu_{1} + bu_{2})(w*v_{1} + bv_{2}) + |a|*u_{1}*v_{1}`
    where `u = (u_{1}, u_{2})` and `v = (v_{1}, v_{2})`.
Returns the norm of the vector u = ( u_ { 1 } u_ { 2 } ) under the dot product defined by u \ cdot v = ( wu_ { 1 } + bu_ { 2 } ) ( w * v_ { 1 } + bv_ { 2 } ) + |a| * u_ { 1 } * v_ { 1 } where u = ( u_ { 1 } u_ { 2 } ) and v = ( v_ { 1 } v_ { 2 } ) .
def norm(u, w, a, b):
    """
    Returns the norm of the vector `u = (u_{1}, u_{2})` under the dot product
    defined by `u \cdot v = (wu_{1} + bu_{2})(w*v_{1} + bv_{2}) + |a|*u_{1}*v_{1}`
    where `u = (u_{1}, u_{2})` and `v = (v_{1}, v_{2})`.
    """
    u_1, u_2 = u[:2]
    return sqrt(dot((u_1, u_2), (u_1, u_2), w, a, b))
def norm ( u , w , a , b ) : u_1 , u_2 = u [ : 2 ] return sqrt ( dot ( ( u_1 , u_2 ) , ( u_1 , u_2 ) , w , a , b ) )