def get_final_pop(dict_gen):
    """
    Returns final population of results dict

    Parameters
    ----------
    dict_gen : dict
        Dict holding generation number as key and population object as value

    Returns
    -------
    tup_res : tuple
        Results tuple (final_pop, list_ann, list_co2)
    """

    #  Get final population
    #  ###################################################################
    final_pop = dict_gen[max(dict_gen.keys())]

    list_ann = []
    list_co2 = []

    print()
    print('Final population results:')
    print('##############################################################')

    #  Loop over individuals
    for ind in final_pop:
        #  Get annuity
        ann = ind.fitness.values[0]
        co2 = ind.fitness.values[1]

        print(ind)
        print('Fitnesses: ' + str(ann) + ', ' + str(co2))

        if isinstance(ann, float) and isinstance(co2, float):
            list_ann.append(ann)
            list_co2.append(co2)

    return (final_pop, list_ann, list_co2)