def METHOD_NAME(par):
    """Solve regularized inversion in least squares sense"""
    np.random.seed(10)
    G = np.random.normal(0, 10, (par["ny"], par["nx"])).astype("float32") + par[
        "imag"
    ] * np.random.normal(0, 10, (par["ny"], par["nx"])).astype("float32")
    Gop = MatrixMult(G, dtype=par["dtype"])
    Reg = MatrixMult(np.eye(par["nx"]), dtype=par["dtype"])
    Weigth = Diagonal(np.ones(par["ny"]), dtype=par["dtype"])
    x = np.ones(par["nx"]) + par["imag"] * np.ones(par["nx"])
    x0 = (
        np.random.normal(0, 10, par["nx"])
        + par["imag"] * np.random.normal(0, 10, par["nx"])
        if par["x0"]
        else None
    )
    y = Gop * x
    # regularized inversion with regularization
    xinv = regularized_inversion(
        Gop, y, [Reg], epsRs=[1e-8], x0=x0, **dict(damp=0, iter_lim=200, show=0)
    )[0]
    assert_array_almost_equal(x, xinv, decimal=3)
    # regularized inversion with weight
    xinv = regularized_inversion(
        Gop, y, None, Weight=Weigth, x0=x0, **dict(damp=0, iter_lim=200, show=0)
    )[0]
    assert_array_almost_equal(x, xinv, decimal=3)
    # regularized inversion with regularization
    xinv = regularized_inversion(
        Gop,
        y,
        [Reg],
        Weight=Weigth,
        epsRs=[1e-8],
        x0=x0,
        **dict(damp=0, iter_lim=200, show=0)
    )[0]
    assert_array_almost_equal(x, xinv, decimal=3)