Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def all_individuals(self):
if self.simulation.number_of_priority_classes == 1:
return self.individuals[0]
return flatten_list(self.individuals)