code: def test_is_dag(self):
      g = Graph(
          5, [(0, 1), (0, 2), (1, 2), (1, 3), (2, 3)], directed=True
      )
      self.assertTrue(g.is_dag())
      g.to_undirected()
      self.assertFalse(g.is_dag())
      g = Graph.Barabasi(1000, 2, directed=True)
      self.assertTrue(g.is_dag())
      g = Graph.GRG(100, 0.2)
      self.assertFalse(g.is_dag())
      g = Graph.Ring(10, directed=True, mutual=False)
      self.assertFalse(g.is_dag())
  
file_path: python-igraph/tests/test_cycles.py
imports: import random
  import unittest
  from igraph import Graph
label_desc: Use image node_id 3 for calling the CycleTests obj's underlying member method code with example usage: obj.test_is_dag() without return types