code: def test_saveload_modelresult_eval_uncertainty():
      """Test for ModelResult.loads() and eval_uncertainty
      GH Issue #909
  
      """
      savefile = "modres_x.txt"
      x = np.linspace(-10, 10, 201)
      amp, cen, wid = 3.4, 1.8, 0.5
  
      y = (
          amp
          * np.exp(-((x - cen) ** 2) / (2 * wid**2))
          / (np.sqrt(2 * np.pi) * wid)
      )
      y += np.random.normal(size=x.size, scale=0.01)
  
      gmod = GaussianModel()
      result = gmod.fit(y, x=x, amplitude=5, center=2, sigma=1)
      save_modelresult(result, savefile)
      time.sleep(0.25)
  
      result2 = load_modelresult(savefile)
  
      dymod = result2.eval_uncertainty()
  
      assert len(dymod) == len(x)
      assert dymod.sum() > 0.0
      os.unlink(savefile)
  
imports: import json
  import os
  import time
  import numpy
  from numpy.testing import assert_allclose
  import pytest
  from lmfit import Parameters
  import lmfit.jsonutils
  from lmfit.lineshapes import gaussian, lorentzian
  from lmfit.model import Model, ModelResult, load_model, load_modelresult, save_model, save_modelresult
  from lmfit.models import ExponentialModel, ExpressionModel, GaussianModel, VoigtModel
label_desc: Use image node_id 12 for calling a global function with example usage: test_saveload_modelresult_eval_uncertainty() without return types