code: def test_to_daft(self):
      dag = DAG([("A", "C"), ("B", "C"), ("D", "A"), ("D", "B")])
      dag.to_daft(node_pos="circular")
  
      self.assertRaises(ValueError, dag.to_daft, node_pos="abcd")
      self.assertRaises(ValueError, dag.to_daft, node_pos={"A": (0, 2)})
      self.assertRaises(ValueError, dag.to_daft, node_pos=["random"])
  
      for layout in [
          "circular",
          "kamada_kawai",
          "planar",
          "random",
          "shell",
          "spring",
          #            "spectral", # TODO: Fails for latest networkx
          "spiral",
      ]:
          dag.to_daft(node_pos=layout)
          dag.to_daft(
              node_pos=layout, pgm_params={"observed_style": "inner"}
          )
          dag.to_daft(
              node_pos=layout,
              edge_params={("A", "C"): {"label": 2}},
              node_params={"A": {"shape": "rectangle"}},
          )
  
imports: import unittest
  import networkx
  import numpy
  import pgmpy.tests.help_functions
  from pgmpy.base import DAG, PDAG
label_desc: Use image node_id 23 for calling the TestDAGCreation obj's underlying member method code with example usage: obj.test_to_daft() without return types