def METHOD_NAME(par):
    """Dot-test and inversion for DWT2D operator for 2d signal"""
    DWTop = DWT2D(dims=(par["nt"], par["nx"]), axes=(0, 1), wavelet="haar", level=3)
    x = np.random.normal(0.0, 1.0, (par["nt"], par["nx"])) + par[
        "imag"
    ] * np.random.normal(0.0, 1.0, (par["nt"], par["nx"]))
    assert dottest(
        DWTop, DWTop.shape[0], DWTop.shape[1], complexflag=0 if par["imag"] == 0 else 3
    )
    y = DWTop * x.ravel()
    xadj = DWTop.H * y  # adjoint is same as inverse for dwt
    xinv = lsqr(DWTop, y, damp=1e-10, iter_lim=10, atol=1e-8, btol=1e-8, show=0)[0]
    assert_array_almost_equal(x.ravel(), xadj, decimal=8)
    assert_array_almost_equal(x.ravel(), xinv, decimal=8)