code: def test_import_of(monkeypatch):
      """Test if an ImportError is raised by _import_of function."""
      # pylint: disable=protected-access
  
      with monkeypatch.context() as m:
          m.setitem(sys.modules, "openfermion", None)
  
          with pytest.raises(
              ImportError, match="This feature requires openfermion"
          ):
              qml.qchem.openfermion_obs._import_of()
  
      with monkeypatch.context() as m:
          m.setitem(sys.modules, "openfermionpyscf", None)
  
          with pytest.raises(
              ImportError, match="This feature requires openfermion"
          ):
              qml.qchem.openfermion_obs._import_of()
  
imports: import sys
  import pytest
  import pennylane
  from pennylane import qchem
label_desc: Use image node_id 3 for calling a global function with example usage: test_import_of(monkeypatch) without return types