code: def test_communicability_betweenness_centrality_small(self):
      result = communicability_betweenness_centrality(nx.path_graph(2))
      assert result == {0: 0, 1: 0}
  
      result = communicability_betweenness_centrality(nx.path_graph(1))
      assert result == {0: 0}
  
      result = communicability_betweenness_centrality(nx.path_graph(0))
      assert result == {}
  
      answer = {0: 0.1411224421177313, 1: 1.0, 2: 0.1411224421177313}
      result = communicability_betweenness_centrality(nx.path_graph(3))
      for k, v in result.items():
          assert answer[k] == pytest.approx(v, abs=1e-7)
  
      result = communicability_betweenness_centrality(
          nx.complete_graph(3)
      )
      for k, v in result.items():
          assert 0.49786143366223296 == pytest.approx(v, abs=1e-7)
  
file_path: networkx/networkx/algorithms/centrality/tests/test_subgraph.py
imports: import pytest
  import networkx
  from networkx.algorithms.centrality.subgraph_alg import communicability_betweenness_centrality, estrada_index, subgraph_centrality, subgraph_centrality_exp
label_desc: Use image node_id 3 for calling the TestSubgraph obj's underlying member method code with example usage: obj.test_communicability_betweenness_centrality_small() without return types