def getFitness(individual):
    """
        Function that can be used as key when sorting

        :param individual:  Some object of one of the classes from the :class:`~modea.Individual` module
        :returns:           Fitness attribute of the given individual object
    """
    return individual.fitness