def get_div_calc(div_calc_name):
    if (div_calc_name == 'L2'):
        calc_diversity = calc_diversity_l2
    elif (div_calc_name == 'InvL2'):
        calc_diversity = calc_homogeneity_l2
    elif (div_calc_name == 'Differential'):
        calc_diversity = calc_differential_entropy
    elif (div_calc_name == 'Discrete'):
        calc_diversity = calc_discrete_entropy_2
    elif (div_calc_name == 'Hull'):
        calc_diversity = calc_convex_hull
    elif (div_calc_name == 'Sum'):
        calc_diversity = sum_experience
    elif (div_calc_name == 'Lifespans'):
        calc_diversity = sum_lifespans
    elif (div_calc_name == 'Lifetimes'):
        calc_diversity = calc_mean_lifetime
    elif (div_calc_name == 'Actions'):
        calc_diversity = calc_mean_actions_matched
    elif (div_calc_name == 'MapTest'):
        calc_diversity = calc_local_map_entropy
    elif (div_calc_name == 'MapTestText'):
        calc_diversity = ham_text
        get_trg_image()
    elif (div_calc_name == 'y_deltas'):
        calc_diversity = calc_y_deltas
    elif ((div_calc_name == 'Scores') or (config.FITNESS_METRIC == 'ALP')):
        calc_diversity = calc_scores
    else:
        raise Exception('Unsupported fitness function: {}'.format(config.FITNESS_METRIC))
    return calc_diversity
def get_div_calc(div_calc_name):
    if (div_calc_name == 'L2'):
        calc_diversity = calc_diversity_l2
    elif (div_calc_name == 'InvL2'):
        calc_diversity = calc_homogeneity_l2
    elif (div_calc_name == 'Differential'):
        calc_diversity = calc_differential_entropy
    elif (div_calc_name == 'Discrete'):
        calc_diversity = calc_discrete_entropy_2
    elif (div_calc_name == 'Hull'):
        calc_diversity = calc_convex_hull
    elif (div_calc_name == 'Sum'):
        calc_diversity = sum_experience
    elif (div_calc_name == 'Lifespans'):
        calc_diversity = sum_lifespans
    elif (div_calc_name == 'Lifetimes'):
        calc_diversity = calc_mean_lifetime
    elif (div_calc_name == 'Actions'):
        calc_diversity = calc_mean_actions_matched
    elif (div_calc_name == 'MapTest'):
        calc_diversity = calc_local_map_entropy
    elif (div_calc_name == 'MapTestText'):
        calc_diversity = ham_text
        get_trg_image()
    elif (div_calc_name == 'y_deltas'):
        calc_diversity = calc_y_deltas
    elif ((div_calc_name == 'Scores') or (config.FITNESS_METRIC == 'ALP')):
        calc_diversity = calc_scores
    else:
        raise Exception('Unsupported fitness function: {}'.format(config.FITNESS_METRIC))
    return calc_diversity