docstr: Laplacian eigenvalues
docstr_tok: ["Laplacian","eigenvalues"]
code: def test_laplacian_spectrum(self):
      "Laplacian eigenvalues"
      evals = np.array([0, 0, 1, 3, 4])
      e = sorted(nx.laplacian_spectrum(self.G))
      np.testing.assert_almost_equal(e, evals)
      e = sorted(nx.laplacian_spectrum(self.WG, weight=None))
      np.testing.assert_almost_equal(e, evals)
      e = sorted(nx.laplacian_spectrum(self.WG))
      np.testing.assert_almost_equal(e, 0.5 * evals)
      e = sorted(nx.laplacian_spectrum(self.WG, weight="other"))
      np.testing.assert_almost_equal(e, 0.3 * evals)
  
file_path: networkx/networkx/linalg/tests/test_spectrum.py
imports: import pytest
  import networkx
  from networkx.generators.degree_seq import havel_hakimi_graph
label_desc: Use image node_id 2 for calling the TestSpectrum obj's underlying member method code with example usage: obj.test_laplacian_spectrum() without return types