code: def test_build_skeleton_chi_square(self):
      for variant in ["orig", "stable", "parallel"]:
          # Fake dataset no: 1
          np.random.seed(42)
          data = pd.DataFrame(
              np.random.randint(0, 2, size=(10000, 5)),
              columns=list("ABCDE"),
          )
          data["F"] = data["A"] + data["B"] + data["C"]
          est = PC(data=data)
          skel, sep_sets = est.estimate(
              variant=variant,
              ci_test="chi_square",
              return_type="skeleton",
              significance_level=0.005,
              show_progress=False,
          )
          expected_edges = {("A", "F"), ("B", "F"), ("C", "F")}
          expected_sepsets = {
              frozenset(("D", "F")): tuple(),
              frozenset(("D", "B")): tuple(),
              frozenset(("A", "C")): tuple(),
              frozenset(("D", "E")): tuple(),
              frozenset(("E", "F")): tuple(),
              frozenset(("E", "C")): tuple(),
              frozenset(("E", "B")): tuple(),
              frozenset(("D", "C")): tuple(),
              frozenset(("A", "B")): tuple(),
              frozenset(("A", "E")): tuple(),
              frozenset(("B", "C")): tuple(),
              frozenset(("A", "D")): tuple(),
          }
          for u, v in skel.edges():
              self.assertTrue(
                  ((u, v) in expected_edges)
                  or ((v, u) in expected_edges)
              )
          self.assertEqual(sep_sets, expected_sepsets)
  
          # Fake dataset no: 2 Expected structure X <- Z -> Y
          def fake_ci(X, Y, Z=tuple(), **kwargs):
              if X == "X" and Y == "Y" and Z == ("Z",):
                  return True
              elif X == "Y" and Y == "X" and Z == ("Z",):
                  return True
              else:
                  return False
  
          np.random.seed(42)
          fake_data = pd.DataFrame(
              np.random.randint(low=0, high=2, size=(10000, 3)),
              columns=["X", "Y", "Z"],
          )
          est = PC(data=fake_data)
          skel, sep_sets = est.estimate(
              variant=variant,
              ci_test=fake_ci,
              return_type="skeleton",
              show_progress=False,
          )
          expected_edges = {("X", "Z"), ("Y", "Z")}
          expected_sepsets = {frozenset(("X", "Y")): ("Z",)}
          for u, v in skel.edges():
              self.assertTrue(
                  ((u, v) in expected_edges)
                  or ((v, u) in expected_edges)
              )
          self.assertEqual(sep_sets, expected_sepsets)
  
imports: import unittest
  import networkx
  import numpy
  import pandas
  from joblib.externals.loky import get_reusable_executor
  from pgmpy.estimators import PC
  from pgmpy.independencies import Independencies
  from pgmpy.models import BayesianNetwork
  from pgmpy.sampling import BayesianModelSampling
  from pgmpy.utils import get_example_model
label_desc: Use image node_id 1 for calling the TestPCEstimatorFromDiscreteData obj's underlying member method code with example usage: obj.test_build_skeleton_chi_square() and returns: True, True, False