code: def test_transformation(
      name, core, active, mapping, coeffs_ref, pauli_strings_ref, tol
  ):
      r"""Test the correctness of the decomposed Hamiltonian for the (:math: `H_2, H_2O, LiH`)
      molecules using Jordan-Wigner and Bravyi-Kitaev transformations.
      """
  
      hf_file = os.path.join(ref_dir, name)
  
      qubit_hamiltonian = qchem.decompose(
          hf_file, mapping=mapping, core=core, active=active
      )
  
      coeffs = np.array(list(qubit_hamiltonian.terms.values()))
      pauli_strings = list(qubit_hamiltonian.terms.keys())
  
      assert np.allclose(coeffs, coeffs_ref, **tol)
      assert pauli_strings == pauli_strings_ref
  
imports: import os
  import numpy
  import pytest
  from pennylane import qchem
label_desc: Use image node_id 1 for calling a global function with example usage: test_transformation(name, core, active, mapping, coeffs_ref, pauli_strings_ref, tol) without return types