I know that in Newtonian mechanics one can derive the virial theorem for $N$ gravitating particles
\begin{equation} 2\langle T\rangle=-\langle U\rangle \end{equation}
where $T$ is the kinetic energy of said particles and $U$ is their Newtonian gravitational energy. This can also be generalized to special relativity without too many problems. Now, let’s say we have an action principle
\begin{equation} S=\int d^4x \big( L_{matter}+L_{EH}\big) \end{equation}
Where $L_{matter}$ is the Lagrangian density for the matter distribution and $L_{EH}$ is the Einstein-Hilbert action for General Relativity.
Is there a derivation of a virial Theorem where we get some average of the energy momentum tensor on one side and some notion of gravitational energy coming from the metric tensor on the other side?
I tried searching for this but its unclear that it exists when treating gravity in full general relativity. Any explanations would be great, thanks!