code: def setUp(self):
      # set random seed
      np.random.seed(0)
  
      # test data for chow-liu
      self.data12 = pd.DataFrame(
          np.random.randint(low=0, high=2, size=(100, 5)),
          columns=["A", "B", "C", "D", "E"],
      )
  
      # test data for chow-liu
      model = BayesianNetwork(
          [("A", "B"), ("A", "C"), ("B", "D"), ("B", "E"), ("C", "F")]
      )
      cpd_a = TabularCPD("A", 2, [[0.4], [0.6]])
      cpd_b = TabularCPD(
          "B",
          3,
          [[0.6, 0.2], [0.3, 0.5], [0.1, 0.3]],
          evidence=["A"],
          evidence_card=[2],
      )
      cpd_c = TabularCPD(
          "C",
          2,
          [[0.3, 0.4], [0.7, 0.6]],
          evidence=["A"],
          evidence_card=[2],
      )
      cpd_d = TabularCPD(
          "D",
          3,
          [[0.5, 0.3, 0.1], [0.4, 0.4, 0.8], [0.1, 0.3, 0.1]],
          evidence=["B"],
          evidence_card=[3],
      )
      cpd_e = TabularCPD(
          "E",
          2,
          [[0.3, 0.5, 0.2], [0.7, 0.5, 0.8]],
          evidence=["B"],
          evidence_card=[3],
      )
      cpd_f = TabularCPD(
          "F",
          3,
          [[0.3, 0.6], [0.5, 0.2], [0.2, 0.2]],
          evidence=["C"],
          evidence_card=[2],
      )
  
      model.add_cpds(cpd_a, cpd_b, cpd_c, cpd_d, cpd_e, cpd_f)
      inference = BayesianModelSampling(model)
      self.data13 = inference.forward_sample(size=10000)
  
      # test data for TAN
      model = BayesianNetwork(
          [
              ("A", "R"),
              ("A", "B"),
              ("A", "C"),
              ("A", "D"),
              ("A", "E"),
              ("R", "B"),
              ("R", "C"),
              ("R", "D"),
              ("R", "E"),
          ]
      )
      cpd_a = TabularCPD("A", 2, [[0.7], [0.3]])
      cpd_r = TabularCPD(
          "R",
          3,
          [[0.6, 0.2], [0.3, 0.5], [0.1, 0.3]],
          evidence=["A"],
          evidence_card=[2],
      )
      cpd_b = TabularCPD(
          "B",
          3,
          [
              [0.1, 0.1, 0.2, 0.2, 0.7, 0.1],
              [0.1, 0.3, 0.1, 0.2, 0.1, 0.2],
              [0.8, 0.6, 0.7, 0.6, 0.2, 0.7],
          ],
          evidence=["A", "R"],
          evidence_card=[2, 3],
      )
      cpd_c = TabularCPD(
          "C",
          2,
          [
              [0.7, 0.2, 0.2, 0.5, 0.1, 0.3],
              [0.3, 0.8, 0.8, 0.5, 0.9, 0.7],
          ],
          evidence=["A", "R"],
          evidence_card=[2, 3],
      )
      cpd_d = TabularCPD(
          "D",
          3,
          [
              [0.3, 0.8, 0.2, 0.8, 0.4, 0.7],
              [0.4, 0.1, 0.4, 0.1, 0.1, 0.1],
              [0.3, 0.1, 0.4, 0.1, 0.5, 0.2],
          ],
          evidence=["A", "R"],
          evidence_card=[2, 3],
      )
      cpd_e = TabularCPD(
          "E",
          2,
          [
              [0.5, 0.6, 0.6, 0.5, 0.5, 0.4],
              [0.5, 0.4, 0.4, 0.5, 0.5, 0.6],
          ],
          evidence=["A", "R"],
          evidence_card=[2, 3],
      )
      model.add_cpds(cpd_a, cpd_r, cpd_b, cpd_c, cpd_d, cpd_e)
      inference = BayesianModelSampling(model)
      self.data22 = inference.forward_sample(size=10000)
  
imports: import unittest
  import networkx
  import numpy
  import pandas
  from joblib.externals.loky import get_reusable_executor
  from pgmpy.estimators import TreeSearch
  from pgmpy.factors.discrete import TabularCPD
  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 TestTreeSearch obj's underlying member method code with example usage: obj.setUp() without return types