code: def test_error_raised_if_jax_not_installed():
      """Test that an error is raised if a convenience function is called without jax installed"""
      try:
          import jax  # pylint: disable=unused-import
  
          pytest.skip()
      except ImportError:
          with pytest.raises(
              ImportError, match="Module jax is required"
          ):
              qml.pulse.pwc(10)
          with pytest.raises(
              ImportError, match="Module jax is required"
          ):
              qml.pulse.pwc_from_function(10, 10)
  
imports: import inspect
  from functools import partial
  import numpy
  import pytest
  import pennylane
  from pennylane.pulse.parametrized_hamiltonian import ParametrizedHamiltonian
label_desc: Use image node_id 1 for calling a global function with example usage: test_error_raised_if_jax_not_installed() without return types