Towards a non-equilibrium thermodynamic theory of ecosystem assembly and development