<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def udot(op1, op2):
 """Matrix or vector dot product that preserves units This is a wrapper around np.dot that preserves units. Examples -------- [[2. 2.] [2. 2.]] km*s """

    dot = np.dot(op1.d, op2.d)
    units = op1.units * op2.units
    if dot.shape == ():
        return unyt_quantity(dot, units)
    return unyt_array(dot, units)