Financial contagion and economic development: An epidemiological approach