code: def test_diff_hamiltonian_error(symbols, geometry):
      r"""Test that molecular_hamiltonian raises an error with unsupported mapping."""
  
      with pytest.raises(
          ValueError, match="Only 'jordan_wigner' mapping is supported"
      ):
          qchem.molecular_hamiltonian(
              symbols, geometry, method="dhf", mapping="bravyi_kitaev"
          )
  
      with pytest.raises(
          ValueError,
          match="Only 'dhf' and 'pyscf' backends are supported",
      ):
          qchem.molecular_hamiltonian(symbols, geometry, method="psi4")
  
      with pytest.raises(
          ValueError, match="Openshell systems are not supported"
      ):
          qchem.molecular_hamiltonian(symbols, geometry, mult=3)
  
file_path: pennylane/tests/qchem/of_tests/test_molecular_hamiltonian.py
imports: import pytest
  from pennylane import Identity, PauliX, PauliY, PauliZ
  from pennylane import numpy
  from pennylane import qchem
  from pennylane.ops import Hamiltonian
  from pennylane.ops.functions import dot
  from pennylane.pauli import pauli_sentence
  from pennylane.operation import enable_new_opmath, disable_new_opmath
label_desc: Use image node_id 6 for calling a global function with example usage: test_diff_hamiltonian_error(symbols, geometry) without return types