<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def simulated_fit_iter( self, n=None, pexact=None, add_priornoise=False, bootstrap=None, **kargs ):
 """ Iterator that returns simulation copies of a fit. Fit reliability is tested using simulated data which replaces the mean values in ``self.y`` with random numbers drawn from a distribution whose mean equals ``self.fcn(pexact)`` and whose covariance matrix is the same as ``self.y``'s. Simulated data is very similar to the original fit data, ``self.y``, but corresponds to a world where the correct values for the parameters (*i.e.*, averaged over many simulated data sets) are given by ``pexact``. ``pexact`` is usually taken equal to ``fit.pmean``. Each iteration of the iterator creates new simulated data, with different random numbers, and fits it, returning the the :class:`lsqfit.nonlinear_fit` that results. The simulated data has the same covariance matrix as ``fit.y``. Typical usage is:: for sfit in fit.simulated_fit_iter(n=3):
 Only a few iterations are needed to get a sense of the fit's reliability since we know the correct answer in each case. The simulated fit's output results should agree with ``pexact`` (``=fit.pmean`` here) within the simulated fit's errors. Setting parameter ``add_priornoise=True`` varies the means of the priors as well as the means of the data. This option is useful for testing goodness of fit because with it ``chi**2/N`` should be ``1 ± sqrt(2/N)``, where ``N`` is the number of degrees of freedom. (``chi**2/N`` can be significantly smaller than one without added noise in prior means.) Simulated fits can also be used to estimate biases in the fit's output parameters or functions of them, should non-Gaussian behavior arise. This is possible, again, because we know the correct value for every parameter before we do the fit. Again only a few iterations may be needed for reliable estimates. Args: n (int or ``None``):
 Maximum number of iterations (equals infinity if ``None``). pexact (``None`` or array/dict of numbers):
 Fit-parameter values for the underlying distribution used to generate simulated data; replaced by ``self.pmean`` if is ``None`` (default). add_priornoise (bool):
 Vary prior means if ``True``; otherwise vary only the means in ``self.y`` (default). kargs: Dictionary containing override values for fit parameters. Returns: An iterator that returns :class:`lsqfit.nonlinear_fit`\s for different simulated data. """

        pexact = self.pmean if pexact is None else pexact
        # bootstrap is old name for add_priornoise; keep for legacy code
        if bootstrap is not None:
            add_priornoise = bootstrap
        # Note: don't need svdcut since these are built into the data_iter
        fargs = dict(
            fcn=self.fcn, svdcut=None, p0=pexact, fitter=self.fitter,
            )
        fargs.update(self.fitterargs)
        fargs.update(kargs)
        for ysim, priorsim in self.simulated_data_iter(
            n, pexact=pexact, add_priornoise=add_priornoise
            ):
            fit = nonlinear_fit(
                data=(self.x, ysim), prior=priorsim, _fdata=self.fdata,
                **fargs
                )
            fit.pexact = pexact
            yield fit