<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_parameters_from_yaml(self, yamlfile, update_sources=False):
 """Load model parameters from yaml Parameters yamlfile : str Name of the input yaml file. """

        d = utils.load_yaml(yamlfile)
        for src, src_pars in d.items():
            for par_name, par_dict in src_pars.items():
                if par_name in ['SpectrumType']:
                    continue
                par_value = par_dict.get('value', None)
                par_error = par_dict.get('error', None)
                par_scale = par_dict.get('scale', None)
                par_min = par_dict.get('min', None)
                par_max = par_dict.get('max', None)
                par_free = par_dict.get('free', None)
                if par_min is not None and par_max is not None:
                    par_bounds = [par_min, par_max]
                else:
                    par_bounds = None
                try:
                    self.set_parameter(src, par_name, par_value, true_value=False,
                                       scale=par_scale, bounds=par_bounds, error=par_error,
                                       update_source=update_sources)
                except RuntimeError as msg:
                    self.logger.warn(msg)
                    self.logger.warn("Did not set parameter %s:%s"%(src,par_name))                    
                    continue
                except Exception as msg:
                    self.logger.warn(msg)
                    continue
                if par_free is not None:
                    self.free_parameter(src, par_name, par_free)
        self._sync_params_state()