def normalize_score(score: np.ndarray, env_id: str) -> np.ndarray:
    """
    Normalize score to be in [0, 1] where 1 is maximal performance.

    :param score: unnormalized score
    :param env_id: environment id
    :return: normalized score
    """
    if env_id not in min_max_score_per_env:
        raise KeyError(f"No reference score for {env_id}")
    reference_score = min_max_score_per_env[env_id]
    return (score - reference_score.min) / (reference_score.max - reference_score.min)

    Normalize score to be in [0, 1] where 1 is maximal performance.

    :param score: unnormalized score
    :param env_id: environment id
    :return: normalized score
    
rl_zoo3/plots/score_normalization.py