I would like very much to express, for example,
R.<x, y> = PowerSeriesRing(QQ, default_prec = 20)
g(x, g(x, g(x, x)))
Or,
f(x, f(x, f(x, f(x, f(x, f(x, f(x, f(x, f(x, f(x, f(x, f(x, (f(x, (f(x, f(x,y))))))))))))))))).expand()
In a more elegant way, for a specified number of self-compositions in one variable. I have only been able to find the sage function of composition for one variable polynomials, not for nesting two variable power series.