I see in papers (here in eq. 3, for example) that it can be done like this using Fubini

$$mathbb{E}_xmathbb{E}_thetalog f(x|theta)=mathbb{E}_thetamathbb{E}_xlog f(x|theta)$$

Where $f(x|theta)$ is a conditional probability density.

I don’t immediately see why $mathbb{E}_thetamathbb{E}_x|log f(x|theta)|leqinfty$. Is it actually the case? Or we need some additional conditions on $f$?