code: def testDistgraphcomm(self):
      comm = self.COMM
      size = comm.Get_size()
      rank = comm.Get_rank()
      #
      try:
          topo = comm.Create_dist_graph([], [], [], MPI.UNWEIGHTED)
          topo.Free()
      except NotImplementedError:
          self.skipTest("mpi-comm-create_dist_graph")
      #
      sources = [rank]
      degrees = [3]
      destinations = [(rank - 1) % size, rank, (rank + 1) % size]
      topo = comm.Create_dist_graph(
          sources, degrees, destinations, MPI.UNWEIGHTED
      )
      self.assertTrue(topo.is_topo)
      self.assertEqual(topo.topology, MPI.DIST_GRAPH)
      self.checkFortran(topo)
      self.assertEqual(topo.Get_dist_neighbors_count(), (3, 3, False))
      topo.Free()
      weights = list(range(1, 4))
      topo = comm.Create_dist_graph(
          sources, degrees, destinations, weights
      )
      self.assertEqual(topo.Get_dist_neighbors_count(), (3, 3, True))
      topo.Free()
  
imports: from mpi4py import MPI
  import mpiunittest
label_desc: Use image node_id 6 for calling the BaseTestTopo obj's underlying member method code with example usage: obj.testDistgraphcomm() without return types