code: def test_init_normal(self):
      # Mix directed and undirected
      directed_edges = [("A", "C"), ("D", "C")]
      undirected_edges = [("B", "A"), ("B", "D")]
      pdag = PDAG(
          directed_ebunch=directed_edges,
          undirected_ebunch=undirected_edges,
      )
      expected_edges = {
          ("A", "C"),
          ("D", "C"),
          ("A", "B"),
          ("B", "A"),
          ("B", "D"),
          ("D", "B"),
      }
      self.assertEqual(set(pdag.edges()), expected_edges)
      self.assertEqual(set(pdag.nodes()), {"A", "B", "C", "D"})
      self.assertEqual(pdag.directed_edges, set(directed_edges))
      self.assertEqual(pdag.undirected_edges, set(undirected_edges))
  
      directed_edges = [("A", "C"), ("D", "C")]
      undirected_edges = [("B", "A"), ("B", "D")]
      pdag = PDAG(
          directed_ebunch=directed_edges,
          undirected_ebunch=undirected_edges,
          latents=["A", "C"],
      )
      expected_edges = {
          ("A", "C"),
          ("D", "C"),
          ("A", "B"),
          ("B", "A"),
          ("B", "D"),
          ("D", "B"),
      }
      self.assertEqual(set(pdag.edges()), expected_edges)
      self.assertEqual(set(pdag.nodes()), {"A", "B", "C", "D"})
      self.assertEqual(pdag.directed_edges, set(directed_edges))
      self.assertEqual(pdag.undirected_edges, set(undirected_edges))
      self.assertEqual(pdag.latents, set(["A", "C"]))
  
      # Only undirected
      undirected_edges = [
          ("A", "C"),
          ("D", "C"),
          ("B", "A"),
          ("B", "D"),
      ]
      pdag = PDAG(undirected_ebunch=undirected_edges)
      expected_edges = {
          ("A", "C"),
          ("C", "A"),
          ("D", "C"),
          ("C", "D"),
          ("B", "A"),
          ("A", "B"),
          ("B", "D"),
          ("D", "B"),
      }
      self.assertEqual(set(pdag.edges()), expected_edges)
      self.assertEqual(set(pdag.nodes()), {"A", "B", "C", "D"})
      self.assertEqual(pdag.directed_edges, set())
      self.assertEqual(pdag.undirected_edges, set(undirected_edges))
  
      undirected_edges = [
          ("A", "C"),
          ("D", "C"),
          ("B", "A"),
          ("B", "D"),
      ]
      pdag = PDAG(
          undirected_ebunch=undirected_edges, latents=["A", "D"]
      )
      expected_edges = {
          ("A", "C"),
          ("C", "A"),
          ("D", "C"),
          ("C", "D"),
          ("B", "A"),
          ("A", "B"),
          ("B", "D"),
          ("D", "B"),
      }
      self.assertEqual(set(pdag.edges()), expected_edges)
      self.assertEqual(set(pdag.nodes()), {"A", "B", "C", "D"})
      self.assertEqual(pdag.directed_edges, set())
      self.assertEqual(pdag.undirected_edges, set(undirected_edges))
      self.assertEqual(pdag.latents, set(["A", "D"]))
  
      # Only directed
      directed_edges = [("A", "B"), ("D", "B"), ("A", "C"), ("D", "C")]
      pdag = PDAG(directed_ebunch=directed_edges)
      self.assertEqual(set(pdag.edges()), set(directed_edges))
      self.assertEqual(set(pdag.nodes()), {"A", "B", "C", "D"})
      self.assertEqual(pdag.directed_edges, set(directed_edges))
      self.assertEqual(pdag.undirected_edges, set())
  
      directed_edges = [("A", "B"), ("D", "B"), ("A", "C"), ("D", "C")]
      pdag = PDAG(directed_ebunch=directed_edges, latents=["D"])
      self.assertEqual(set(pdag.edges()), set(directed_edges))
      self.assertEqual(set(pdag.nodes()), {"A", "B", "C", "D"})
      self.assertEqual(pdag.directed_edges, set(directed_edges))
      self.assertEqual(pdag.undirected_edges, set())
      self.assertEqual(pdag.latents, set(["D"]))
  
imports: import unittest
  import networkx
  import numpy
  import pgmpy.tests.help_functions
  from pgmpy.base import DAG, PDAG
label_desc: Use image node_id 2 for calling the TestPDAG obj's underlying member method code with example usage: obj.test_init_normal() without return types