<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_tnw(orbit):
 """In the TNW Local Orbital Reference Frame, x is oriented along the velocity vector, z along the angular momentum, and y complete the frame. Args: orbit (list):
 Array of length 6 Return: numpy.ndarray: matrix to convert from inertial frame to TNW. True """


    pos, vel = _split(orbit)

    t = vel / norm(vel)
    w = np.cross(pos, vel) / (norm(pos) * norm(vel))
    n = np.cross(w, t)

    return np.array([t, n, w])