def METHOD_NAME(par):
    """CG with linear operator (and ndarray as input and output)"""
    np.random.seed(10)
    dims = dimsd = (par["nx"], par["ny"])
    x = np.ones(dims) + par["imag"] * np.ones(dims)
    A = np.random.normal(0, 10, (x.size, x.size)) + par["imag"] * np.random.normal(
        0, 10, (x.size, x.size)
    )
    A = np.conj(A).T @ A  # to ensure definite positive matrix
    Aop = MatrixMult(A, dtype=par["dtype"])
    Aop.dims = dims
    Aop.dimsd = dimsd
    if par["x0"]:
        x0 = np.random.normal(0, 10, dims) + par["imag"] * np.random.normal(0, 10, dims)
    else:
        x0 = None
    y = Aop * x
    xinv = cg(Aop, y, x0=x0, niter=2 * x.size, tol=1e-5, show=True)[0]
    assert xinv.shape == x.shape
    assert_array_almost_equal(x, xinv, decimal=4)