code: def _load_scalar_fit(self, fit_key=None, h5file=None, fit_data=None):
          
          if (fit_key is None) ^ (h5file is None):
              raise ValueError("Either specify both fit_key and h5file, or"
                  " neither")
  
          if not ((fit_key is None) ^ (fit_data is None)):
              raise ValueError("Specify exactly one of fit_key and fit_data.")
  
          if fit_data is None:
              fit_data = self._read_dict(h5file[fit_key])
  
          if 'fitType' in fit_data.keys() and fit_data['fitType'] == 'GPR':
              fit = _eval_pysur.evaluate_fit.getGPRFitAndErrorEvaluator(fit_data)
          else:
              fit = _eval_pysur.evaluate_fit.getFitEvaluator(fit_data)
  
          return fit
docs: Loads a single fit