docstr: Betweenness centrality: K5 endpoints
docstr_tok: ["Betweenness","centrality",":","K5","endpoints"]
code: def test_K5_endpoints(self):
      """Betweenness centrality: K5 endpoints"""
      G = nx.complete_graph(5)
      b = nx.betweenness_centrality(
          G, weight=None, normalized=False, endpoints=True
      )
      b_answer = {0: 4.0, 1: 4.0, 2: 4.0, 3: 4.0, 4: 4.0}
      for n in sorted(G):
          assert b[n] == pytest.approx(b_answer[n], abs=1e-7)
      # normalized = True case
      b = nx.betweenness_centrality(
          G, weight=None, normalized=True, endpoints=True
      )
      b_answer = {0: 0.4, 1: 0.4, 2: 0.4, 3: 0.4, 4: 0.4}
      for n in sorted(G):
          assert b[n] == pytest.approx(b_answer[n], abs=1e-7)
  
imports: import pytest
  import networkx
label_desc: Use image node_id 2 for calling the TestBetweennessCentrality obj's underlying member method code with example usage: obj.test_K5_endpoints() without return types