In a proof of I am reading there is the following setting:
$W$ is a random variable such that $ E[\mid W\mid]<\infty$ and $T$ is another variable (a stopping time) that takes values in $\Bbb N\cup\{\infty\}$ but here $P[T<\infty]=1$.
We have $$E[|W|\Bbb 1\{T\le n\}]=E[|W|\sum\limits_{k=1}^n\Bbb 1\{T=k\}]=\sum\limits_{k=1}^nE[|W|\Bbb 1\{T=k\}]=\sum\limits_{k=1}^nE[|W|\vert T=k]P[T=k]\xrightarrow[n\rightarrow\infty]{}E[|W|]$$
I'm not sure why the third equality is true: $\sum\limits_{k=1}^nE[|W|\Bbb 1\{T=k\}]=\sum\limits_{k=1}^nE[|W|\vert T=k]P[T=k]$
By definition of conditional expectation if $P(A)>0$ so
$E(Y|A)=\frac{E(YI_A)}{P(A)}$ (this definition for all type of variable continues, discrete and mixture https://en.wikipedia.org/wiki/Conditional_expectation ) so
$E(|W| \bigg{|} (T=k))=\frac{E(|W| I_{(T=k)})}{P(T=k)}$
so
$E(|W| I_{(T=k)}) =E(|W| \bigg{|} (T=k)) P(T=k)$
by take $\sum$ of both side, you get what you want.