def load_eval_result(output_path: Text, model_name: Optional[Text]=None) -> EvalResult:
    'Creates an EvalResult object for use with the visualization functions.'
    (eval_config, data_location, file_format, model_locations) = _load_eval_run(output_path)
    metrics_proto_list = metrics_and_plots_serialization.load_and_deserialize_metrics(path=os.path.join(output_path, constants.METRICS_KEY), model_name=model_name)
    plots_proto_list = metrics_and_plots_serialization.load_and_deserialize_plots(path=os.path.join(output_path, constants.PLOTS_KEY))
    if (model_name is None):
        model_location = list(model_locations.values())[0]
    else:
        model_location = model_locations[model_name]
    return EvalResult(slicing_metrics=metrics_proto_list, plots=plots_proto_list, config=eval_config, data_location=data_location, file_format=file_format, model_location=model_location)
Creates an EvalResult object for use with the visualization functions.
def load_eval_result(output_path: Text, model_name: Optional[Text]=None) -> EvalResult:
    
    (eval_config, data_location, file_format, model_locations) = _load_eval_run(output_path)
    metrics_proto_list = metrics_and_plots_serialization.load_and_deserialize_metrics(path=os.path.join(output_path, constants.METRICS_KEY), model_name=model_name)
    plots_proto_list = metrics_and_plots_serialization.load_and_deserialize_plots(path=os.path.join(output_path, constants.PLOTS_KEY))
    if (model_name is None):
        model_location = list(model_locations.values())[0]
    else:
        model_location = model_locations[model_name]
    return EvalResult(slicing_metrics=metrics_proto_list, plots=plots_proto_list, config=eval_config, data_location=data_location, file_format=file_format, model_location=model_location)