code: def test_importerror_sql(ex):
      with pytest.raises(ImportError):
          ex.observers.append(SqlObserver("some_uri"))
  
          @ex.config
          def cfg():
              a = {"b": 1}
  
          @ex.main
          def foo(a):
              return a["b"]
  
          ex.run()
  
imports: import pytest
  from sacred.optional import has_sqlalchemy
  from sacred.observers import SqlObserver
  from sacred import Experiment
label_desc: Use image node_id 2 for calling a global function with example usage: test_importerror_sql(ex) and returns: a