code: def test_copy(self):
      pdag_copy = self.pdag_mix.copy()
      expected_edges = {
          ("A", "C"),
          ("D", "C"),
          ("A", "B"),
          ("B", "A"),
          ("B", "D"),
          ("D", "B"),
      }
      expected_dir = [("A", "C"), ("D", "C")]
      expected_undir = [("B", "A"), ("B", "D")]
      self.assertEqual(set(pdag_copy.edges()), expected_edges)
      self.assertEqual(set(pdag_copy.nodes()), {"A", "B", "C", "D"})
      self.assertEqual(
          pdag_copy.directed_edges, set([("A", "C"), ("D", "C")])
      )
      self.assertEqual(
          pdag_copy.undirected_edges, set([("B", "A"), ("B", "D")])
      )
      self.assertEqual(pdag_copy.latents, set())
  
      pdag_copy = self.pdag_latent.copy()
      expected_edges = {
          ("A", "C"),
          ("D", "C"),
          ("A", "B"),
          ("B", "A"),
          ("B", "D"),
          ("D", "B"),
      }
      expected_dir = [("A", "C"), ("D", "C")]
      expected_undir = [("B", "A"), ("B", "D")]
      self.assertEqual(set(pdag_copy.edges()), expected_edges)
      self.assertEqual(set(pdag_copy.nodes()), {"A", "B", "C", "D"})
      self.assertEqual(
          pdag_copy.directed_edges, set([("A", "C"), ("D", "C")])
      )
      self.assertEqual(
          pdag_copy.undirected_edges, set([("B", "A"), ("B", "D")])
      )
      self.assertEqual(pdag_copy.latents, set(["A", "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 3 for calling the TestPDAG obj's underlying member method code with example usage: obj.test_copy() without return types