We define some quantum map $ A^n_m (\rho) $ and let it act on density matrix $\rho$:
$$ A^n_m (\rho) = \sum_{ij} | i...i \rangle^n \langle i...i|^m \rho | j...j \rangle^m \langle j...j|^n.$$
Taking the trace of this should result in the following:
$$Tr(A^n_m (\rho)) = \sum_i \langle i...i|^m \rho | i...i \rangle^m.$$
I would greatly appreciate it if someone could explain me where this step comes from. For context see arXiv:1704.08668 (https://arxiv.org/abs/1704.08668) page 4.