The importance of neural diversity in complex cognitive tasks