class_docstr: Tests the subroutine that determines the 1D reconstruction
  jobs to be carried out for a call to ``reconstruct`` .
docstr: Test the prepared jobs when using spectra and shifts.
docstr_tok: ["Test","the","prepared","jobs","when","using","spectra","and","shifts","."]
code: def test_with_spectra(self, ids, spectra, tol):
      """Test the prepared jobs when using spectra and shifts."""
      ids_, recon_fn, jobs, need_f0 = _prepare_jobs(
          ids,
          nums_frequency=None,
          spectra=spectra,
          shifts=None,
          atol=tol,
      )
      if ids is None:
          assert self.nested_dict_ids_match(spectra, ids_)
      else:
          assert self.ids_match(ids, ids_)
  
      # Check function to use for 1D reconstructions
      assert recon_fn == _reconstruct_gen
  
      # Check reconstruction jobs to be run
      assert self.nested_dict_ids_match(jobs, ids_)
  
      # Check all job details
      for _id, _jobs in jobs.items():
          for idx, job in _jobs.items():
              if len(spectra[_id][idx]) == 1:
                  assert job is None
                  continue
              assert list(job.keys()) == ["shifts", "spectrum"]
              assert job["shifts"] is None
              assert job["spectrum"] == spectra[_id][idx]
      assert need_f0
  
imports: from inspect import signature
  from itertools import chain
  from functools import reduce
  import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.fourier.reconstruct import _reconstruct_equ, _reconstruct_gen, _prepare_jobs, reconstruct
  from pennylane.fourier.utils import join_spectra
label_desc: Use image node_id 4 for calling the TestPrepareJobs obj's underlying member method code with example usage: obj.test_with_spectra(ids, spectra, tol) without return types