<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def to_qsw(orbit):
 """In the QSW Local Orbital Reference Frame, x is oriented along the position vector, z along the angular momentum, and y complete the frame. The frame is sometimes also called RSW (where R stands for radial) or LVLH (Local Vertical Local Horizontal). Args: orbit (list):
 Array of length 6 Return: numpy.ndarray: matrix to convert from inertial frame to QSW True """


    pos, vel = _split(orbit)

    q = pos / norm(pos)
    w = np.cross(pos, vel) / (norm(pos) * norm(vel))
    s = np.cross(w, q)

    return np.array([q, s, w])