code: def test_saveload_modelresult_exception():
      """Make sure the proper exceptions are raised when needed."""
      model, _pars = create_model_params(x, y)
      save_model(model, SAVE_MODEL)
  
      with pytest.raises(
          AttributeError, match=r"needs saved ModelResult"
      ):
          load_modelresult(SAVE_MODEL)
      clear_savefile(SAVE_MODEL)
  
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 9 for calling a global function with example usage: test_saveload_modelresult_exception() without return types