This question comes from a derivation of the wiki page here about the unconditional acceptance probability:
The general form seems to be:
$ \mathbb P(U\le h(X))=\mathbb E_g(\mathbb P(U\le h(x)\mid X=x))$
where $U$ is uniformly distributed over [0,1], $h$ is a nice function with range being [0,1] and the pdf of r.v. $X$ is $g(x)$. Maybe $U$ and $X$ are independent from the context of the wiki. I don't know how to prove this equation.

$\mathbb P(U\leq h(X))=\int_{x} P(U\leq h(X)|X=x)g(x)dx$ Now take $f(x)=P(U\leq h(X)|X=x)$ Then $\mathbb P(U\leq h(X))=\int_{x} f(x)g(x)dx=E_{g}(f(X))=E_{g}(P(U\leq h(X)|X=x))$