<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rot_from_vectors(start_vec, end_vec):
 """Return the rotation matrix to rotate from one vector to another."""


        dot = start_vec.dot(end_vec)
        # TODO: check if dot is a valid number
        angle = math.acos(dot)
        # TODO: check if angle is a valid number
        cross = start_vec.cross(end_vec)
        cross.normalize
        rot_matrix = Matrix44.from_axis_angle(cross, angle)

        # TODO: catch exception and return identity for invalid numbers
        return rot_matrix