Add map_fit_params_to_dict.

Helper function.