Say I have a function $f_g$ on the moduli space of curves $M_g$ for all $g\geq 1$. Is there some way of extending this to the moduli space of abelian varieties $A_g$ in a nice way?

What if I have more information? Say I can extend my function on $M_g$ in some compatible way to the moduli spaces $M_{g,n}$, for example. Is there more hope now?

What if we add level structures?