def METHOD_NAME(par):
    """Dot-test and inversion for Diagonal operator for unflattened 2d signal (v2 behaviour)"""
    for idim, ddim in enumerate((par["nx"], par["nt"])):
        d = np.arange(ddim) + 1.0 + par["imag"] * (np.arange(ddim) + 1.0)
        Dop = Diagonal(d, dims=(par["nx"], par["nt"]), axis=idim, dtype=par["dtype"])
        assert dottest(
            Dop,
            par["nx"] * par["nt"],
            par["nx"] * par["nt"],
            complexflag=0 if par["imag"] == 0 else 3,
        )
        x = np.ones((par["nx"], par["nt"])) + par["imag"] * np.ones(
            (par["nx"], par["nt"])
        )
        xlsqr = lsqr(Dop, Dop * x, damp=1e-20, niter=300, atol=1e-8, btol=1e-8, show=0)[0]
        assert_array_almost_equal(x, xlsqr, decimal=4)