<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def as_nonlinear(self, params=None):
 """Return a `Model` equivalent to this object. The nonlinear solver is less efficient, but lets you freeze parameters, compute uncertainties, etc. If the `params` argument is provided, solve() will be called on the returned object with those parameters. If it is `None` and this object has parameters in `self.params`, those will be use. Otherwise, solve() will not be called on the returned object. """

        if params is None:
            params = self.params

        nlm = Model(None, self.data, self.invsigma)
        nlm.set_func(lambda p, x: npoly.polyval(x, p),
                     self.pnames,
                     args=(self.x,))

        if params is not None:
            nlm.solve(params)
        return nlm