code: def test_single_nodes(self):
      # single nodes
      G = nx.complete_bipartite_graph(2, 3)
      G.add_edge(2, 4)
      sbn = sb(G, nodes=[1, 2])
      assert sbn[1] == pytest.approx(0.85, abs=1e-2)
      assert sbn[2] == pytest.approx(0.77, abs=1e-2)
  
      G = nx.complete_bipartite_graph(2, 3)
      G.add_edge(0, 1)
      sbn = sb(G, nodes=[1, 2])
      assert sbn[1] == pytest.approx(0.73, abs=1e-2)
      assert sbn[2] == pytest.approx(0.82, abs=1e-2)
  
imports: import pytest
  import networkx
  from networkx.algorithms.bipartite import spectral_bipartivity
label_desc: Use image node_id 3 for calling the TestSpectralBipartivity obj's underlying member method code with example usage: obj.test_single_nodes() without return types