geometric ingredients in our arguments (and further some relevant results in harmonic analysis) are also available for general parahoric levels.

Strategy of proof
-----------------

We begin with some general comments on our proofs. First, Thm. \[thm\_intro:Kottwitz\_conj\] is a consequence of the stabilization of the right-hand side of the identity (\[eq\_intro:Kottwitz\_formula\]), the key tools in this machinery being the endoscopic transfer conjectures which are now established by Ngo, Waldspurger. Such stabilization was carried out by Kottwitz [@Kottwitz90 $\S$4-$\S$7], [@Kottwitz10] in the case $G^{{\mathrm{der}}}=G^{{\mathrm{sc}}}$. We follow closely his arguments which however need occasionally modifications due to our generality. Our main contribution is the proof of Thm. \[thm\_intro:Kottwitz\_formula\] and now we give a quick overview of the historical origin of our strategy. After previous successes with examples (by Eichler, Shimura, Kuga, Sato, and Ihara), a systematic approach to a formula for the Lefschetz number in question (and its stabilization) was conceived by Langlands based on Lefschetz-Grothendieck trace formula, and a set of ideas and techniques was developed by Langlands [@Langlands76], [@Langlands79] and Kottwitz [@Kottwitz84b] (“Langlands-Kottwitz method”). Meanwhile, it was also realized that this method itself needed some refinement. Then, Langlands and Rapoport [@LR87] recast the problem by developing the theory of Galois gerbs, 