class_docstr: Tests the one-dimensional reconstruction subroutine based on arbitrary
  shifted evaluations for arbitrary frequencies.
docstr: Test that arbitrary-frequency classical functions are reconstructed correctly
  if spectrum contains additional frequencies.
docstr_tok: ["Test","that","arbitrary-frequency","classical","functions","are","reconstructed","correctly","if","spectrum","contains","additional","frequencies","."]
code: def test_with_classical_fun_spectrum_overcomplete(
      self, fun, spectrum, mocker
  ):
      """Test that arbitrary-frequency classical functions are reconstructed correctly
      if spectrum contains additional frequencies."""
      spectrum = spectrum + [0.4812759, 1.2281]
      Fun = Lambda(fun)
      spy = mocker.spy(Fun, "fun")
      # Convert fun to have integer frequencies
      rec = _reconstruct_gen(Fun, spectrum)
      assert (
          spy.call_count
          == len([f for f in spectrum if f > 0.0]) * 2 + 1
      )
      assert fun_close(fun, rec)
  
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 8 for calling the TestReconstructGen obj's underlying member method code with example usage: obj.test_with_classical_fun_spectrum_overcomplete(fun, spectrum, mocker) without return types