code: def test_join_spectra(spectrum1, spectrum2, expected):
      """Test that spectra are joined correctly."""
      joined = join_spectra(spectrum1, spectrum2)
      assert joined == expected
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.fourier.utils import format_nvec, get_spectrum, join_spectra
label_desc: Use image node_id 2 for calling a global function with example usage: test_join_spectra(spectrum1, spectrum2, expected) without return types