This refers to the variety of different ecological roles and functions played by different species in an ecosystem.