def METHOD_NAME(layout):
    a_np = np.random.uniform(size=in_shape).astype(dtype)
    w_np = np.random.uniform(size=kernel_shape).astype(dtype)
    if layout == "NWC":
        np_in = np.transpose(a_np, [0, 2, 1])
        np_w = np.transpose(w_np, [2, 1, 0])
    else:
        np_in = a_np
        np_w = w_np
    b_np = tvm.topi.testing.conv1d_ncw_python(np_in, np_w, stride, padding, dilation)
    if layout == "NWC":
        b_np = np.transpose(b_np, [0, 2, 1])
    return a_np, w_np, b_np