  The concept and the construction of modular graph functions are generalized
from genus-one to higher genus surfaces. The integrand of the four-graviton
superstring amplitude at genus-two provides a generating function for a special
class of such functions. A general method is developed for analyzing the
behavior of modular graph functions under non-separating degenerations in terms
of a natural real parameter $t$. For arbitrary genus, the Arakelov Green
function and the Kawazumi-Zhang invariant degenerate to a Laurent polynomial in
$t$ of degree $(1,1)$ in the limit $t\to\infty$. For genus two, each
coefficient of the low energy expansion of the string amplitude degenerates to
a Laurent polynomial of degree $(w,w)$ in $t$, where $w+2$ is the degree of
homogeneity in the kinematic invariants. These results are exact to all orders
in $t$, up to exponentially suppressed corrections. The non-separating
degeneration of a general class of modular graph functions at arbitrary genus
is sketched and similarly results in a Laurent polynomial in $t$ of bounded
degree. The coefficients in the Laurent polynomial are generalized modular
graph functions for a punctured Riemann surface of lower genus.
