<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dot_special(x2d, x3d):
 """Segment-wise dot product. This function calculates the dot product of x2d with each trial of x3d. Parameters x2d : array, shape (p, m) Input argument. x3d : array, shape (t, m, n) Segmented input data with t trials, m signals, and n samples. The dot product with x2d is calculated for each trial. Returns ------- out : array, shape (t, p, n) Dot product of x2d with each trial of x3d. Examples -------- (6, 7, 150) """

    x3d = atleast_3d(x3d)
    x2d = np.atleast_2d(x2d)
    return np.concatenate([x2d.dot(x3d[i, ...])[np.newaxis, ...]
                           for i in range(x3d.shape[0])])