<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dtw_distance(rep_one, rep_two, norm=True):
 """Computes the distance between two representations with the same number of filters using Dynamic Time Warping. Parameters rep_one : 2D array First representation to compare. First dimension is time in frames or samples and second dimension is the features. rep_two : 2D array Second representation to compare. First dimension is time in frames or samples and second dimension is the features. Returns ------- float Distance of dynamically time warping `rep_one` to `rep_two`. """

    if not isinstance(rep_one, np.ndarray):
        rep_one = rep_one.to_array()
    if not isinstance(rep_two, np.ndarray):
        rep_two = rep_two.to_array()
    assert (rep_one.shape[1] == rep_two.shape[1])
    distMat = generate_distance_matrix(rep_one, rep_two)
    return regularDTW(distMat, norm=norm)