I have a stationary process $\{u_n\}$ and I have a function $f:\mathbb{R}^L\to \mathbb{R}^+$. I want to evaluate the following limit $$\lim_{n\to \infty}\frac{1}{n}\sum_{k=1}^n g(f(\mathbf{u}_{k}))$$ where $\mathbf{u}_k=\begin{bmatrix} u_k & u_{k-1} & \cdots & u_{k-L} \end{bmatrix}$ and $g$ is a smooth real valued function i.e. $g:\mathbb{R}\to \mathbb{R}$.
My question is
Can I use Birkhoff's Ergodic Theorem here to conclude that $$\lim_{n\to \infty}\frac{1}{n}\sum_{k=1}^n g(f(\mathbf{u}_{k}))\stackrel{a.s.}{=}\mathbb{E}(g(f(\mathbf{u}_L)))?$$
I know (at least according to my knowledge) that had it been $\lim_{n\to \infty}\frac{1}{n}\sum_{k=1}^n g(f({u}_{k}))$ the answer would be yes, but I do not have much understanding of ergodic theory to make conclusion about this problem.
Forgive me for my lack of knowledge in this subject which is why I am asking this question, though it maybe trivial to many people here; but I need to understand this. Also it would be great if someone can kindly give some good reference to understand this theorem in the context of this problem (I know basic probability theory and stochastic processes and I am learning measure theory now).