Let $X_1,\ldots,X_n$ be random variables, each with expectation $\mu_{1},\ldots,\mu_{n}$. Further, let $\pi$ be a RV taking values on $\left\{1,\ldots,n\right\}$. In machine learning literature, it is claimed that $\mathbb{E}[X_{\pi}]=\mathbb{E}[\mu_{\pi}]$. Is it true?
I know that by tower property, it holds $\mathbb{E}[X_{\pi}]=\mathbb{E}[\mathbb{E}[X_{\pi}|\pi]]$, where $\mathbb{E}[X_{\pi}|\pi]$ is the conditional expectation of $X_{\pi}$ w.r.t. the $\sigma$-algebra generated by $\pi$. The intuition says that $\mathbb{E}[X_{\pi}|\pi]=\mu_{\pi}$ since $X_{\pi}$ becomes a RV with deterministic index by knowing $\pi$.
However, I can't manage to show that $\mathbb{E}[\mathbb{I}_{\left\{\pi=k\right\}}\mu_{\pi}]=\mathbb{E}[\mathbb{I}_{\left\{\pi=k\right\}}X_{\pi}]$, $\forall k\in [n]$, and therefore $\mu_{\pi}$ is the version of $\mathbb{E}[X_{\pi}|\pi]$.
Thank you for your help in advance.