code: def test_check_ast_errors():
      """Assert that an exception is raised upon AST errors."""
      pars = lmfit.Parameters()
  
      msg = r"at expr='<_?ast.Module object at"
      with pytest.raises(NameError, match=msg):
          pars.add("par1", expr="2.0*par2")
  
imports: from copy import copy, deepcopy
  import os
  import pickle
  import numpy
  from numpy.testing import assert_allclose
  import pytest
  import lmfit
  from lmfit.models import VoigtModel
label_desc: Use image node_id 3 for calling a global function with example usage: test_check_ast_errors() without return types