code: def test_digraph(self):
      G = nx.path_graph(3, create_using=nx.DiGraph())
      c = nx.closeness_centrality(G)
      cr = nx.closeness_centrality(G.reverse())
      d = {0: 0.0, 1: 0.500, 2: 0.667}
      dr = {0: 0.667, 1: 0.500, 2: 0.0}
      for n in sorted(self.P3):
          assert c[n] == pytest.approx(d[n], abs=1e-3)
          assert cr[n] == pytest.approx(dr[n], abs=1e-3)
  
file_path: networkx/networkx/algorithms/centrality/tests/test_closeness_centrality.py
imports: import pytest
  import networkx
label_desc: Use image node_id 3 for calling the TestClosenessCentrality obj's underlying member method code with example usage: obj.test_digraph() without return types