Say $M$ is a matrix acting on $C^r \otimes C^s$. $X$ is the system of dimension $r$, and $Y$ is the system of dimension $s$.
With $|\psi\rangle$ sampled from Haar, how can we show that $$ \int (I_r \otimes \langle\psi|) A (I_r \otimes |\psi\rangle) \, \mathrm{d}\psi = s^{-1} \, Tr_Y(A) $$
where $I_r$ denotes the $r \times r$ identity matrix, and $Tr_Y(\cdot)$ denotes tracing out the $Y$ system.