code: def test_rcisd_state(molecule, basis, symm, tol, wf_ref):
      r"""Test that _rcisd_state returns the correct wavefunction."""
  
      mol = pyscf.gto.M(atom=molecule, basis=basis, symmetry=symm)
      myhf = pyscf.scf.RHF(mol).run()
      myci = pyscf.ci.CISD(myhf).run()
  
      wf_cisd = qchem.convert._rcisd_state(myci, tol=tol)
  
      assert wf_cisd.keys() == wf_ref.keys()
      assert np.allclose(
          abs(np.array(list(wf_cisd.values()))),
          abs(np.array(list(wf_ref.values()))),
      )
  
imports: import os
  import sys
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qchem
  from pennylane.operation import disable_new_opmath, enable_new_opmath
label_desc: Use image node_id 28 for calling a global function with example usage: test_rcisd_state(molecule, basis, symm, tol, wf_ref) without return types