code: def test_all_dags(self):
      self.assertEqual(
          len(list(self.est_rand.all_dags(["A", "B", "C", "D"]))), 543
      )
      # self.assertEqual(len(list(self.est_rand.all_dags(nodes=range(5)))), 29281)  # takes ~30s
  
      abc_dags = set(
          map(
              tuple,
              [sorted(dag.edges()) for dag in self.est_rand.all_dags()],
          )
      )
      abc_dags_ref = set(
          [
              (("A", "B"), ("C", "A"), ("C", "B")),
              (("A", "C"), ("B", "C")),
              (("B", "A"), ("B", "C")),
              (("C", "B"),),
              (("A", "C"), ("B", "A")),
              (("B", "C"), ("C", "A")),
              (("A", "B"), ("B", "C")),
              (("A", "C"), ("B", "A"), ("B", "C")),
              (("A", "B"),),
              (("A", "B"), ("C", "A")),
              (("B", "A"), ("C", "A"), ("C", "B")),
              (("A", "C"), ("C", "B")),
              (("A", "B"), ("A", "C"), ("C", "B")),
              (("B", "A"), ("C", "B")),
              (("A", "B"), ("A", "C")),
              (("C", "A"), ("C", "B")),
              (("A", "B"), ("A", "C"), ("B", "C")),
              (("C", "A"),),
              (("B", "A"), ("B", "C"), ("C", "A")),
              (("B", "A"),),
              (("A", "B"), ("C", "B")),
              (),
              (("B", "A"), ("C", "A")),
              (("A", "C"),),
              (("B", "C"),),
          ]
      )
      self.assertSetEqual(abc_dags, abc_dags_ref)
  
file_path: pgmpy/pgmpy/tests/test_estimators/test_ExhaustiveSearch.py
imports: import unittest
  import numpy
  import pandas
  from pgmpy.estimators import BDeuScore, BicScore, ExhaustiveSearch
label_desc: Use image node_id 2 for calling the TestBaseEstimator obj's underlying member method code with example usage: obj.test_all_dags() without return types