def METHOD_NAME(par):
    """Dot-test, forward and adjoint for Restriction operator for 2d signal"""
    np.random.seed(10)
    x = np.ones((par["nx"], par["nt"])) + par["imag"] * np.ones((par["nx"], par["nt"]))
    # 1st direction
    Nsub = int(np.round(par["nx"] * perc_subsampling))
    iava = np.sort(np.random.permutation(np.arange(par["nx"]))[:Nsub])
    Rop = Restriction(
        (par["nx"], par["nt"]), iava, axis=0, inplace=par["dtype"], dtype=par["dtype"]
    )
    assert dottest(
        Rop,
        Nsub * par["nt"],
        par["nx"] * par["nt"],
        complexflag=0 if par["imag"] == 0 else 3,
    )
    y = (Rop * x.ravel()).reshape(Nsub, par["nt"])
    x1 = (Rop.H * y.ravel()).reshape(par["nx"], par["nt"])
    y1_fromflat = Rop.mask(x.ravel())
    y1 = Rop.mask(x)
    assert_array_almost_equal(y, y1_fromflat.reshape(par["nx"], par["nt"])[iava])
    assert_array_almost_equal(y, y1[iava])
    assert_array_almost_equal(x[iava], x1[iava])
    # 2nd direction
    Nsub = int(np.round(par["nt"] * perc_subsampling))
    iava = np.sort(np.random.permutation(np.arange(par["nt"]))[:Nsub])
    Rop = Restriction(
        (par["nx"], par["nt"]), iava, axis=1, inplace=par["dtype"], dtype=par["dtype"]
    )
    assert dottest(
        Rop,
        par["nx"] * Nsub,
        par["nx"] * par["nt"],
        complexflag=0 if par["imag"] == 0 else 3,
    )
    y = (Rop * x.ravel()).reshape(par["nx"], Nsub)
    x1 = (Rop.H * y.ravel()).reshape(par["nx"], par["nt"])
    y1_fromflat = Rop.mask(x.ravel())
    y1 = Rop.mask(x)
    assert_array_almost_equal(y, y1_fromflat[:, iava])
    assert_array_almost_equal(y, y1[:, iava])
    assert_array_almost_equal(x[:, iava], x1[:, iava])