code: def setUp(self):
      dbn_1 = DynamicBayesianNetwork()
      dbn_1.add_edges_from(
          [
              (("Z", 0), ("X", 0)),
              (("Z", 0), ("Y", 0)),
              (("Z", 0), ("Z", 1)),
          ]
      )
      cpd_start_z_1 = TabularCPD(("Z", 0), 2, [[0.8], [0.2]])
      cpd_x_1 = TabularCPD(
          ("X", 0), 2, [[0.9, 0.6], [0.1, 0.4]], [("Z", 0)], [2]
      )
      cpd_y_1 = TabularCPD(
          ("Y", 0), 2, [[0.7, 0.2], [0.3, 0.8]], [("Z", 0)], [2]
      )
      cpd_trans_z_1 = TabularCPD(
          ("Z", 1), 2, [[0.9, 0.1], [0.1, 0.9]], [("Z", 0)], [2]
      )
      dbn_1.add_cpds(cpd_start_z_1, cpd_trans_z_1, cpd_x_1, cpd_y_1)
      dbn_1.initialize_initial_state()
      self.dbn_inference_1 = DBNInference(dbn_1)
      dbn_2 = DynamicBayesianNetwork()
      dbn_2.add_edges_from(
          [
              (("Z", 0), ("X", 0)),
              (("X", 0), ("Y", 0)),
              (("Z", 0), ("Z", 1)),
          ]
      )
      cpd_start_z_2 = TabularCPD(("Z", 0), 2, [[0.5], [0.5]])
      cpd_x_2 = TabularCPD(
          ("X", 0), 2, [[0.6, 0.9], [0.4, 0.1]], [("Z", 0)], [2]
      )
      cpd_y_2 = TabularCPD(
          ("Y", 0), 2, [[0.2, 0.3], [0.8, 0.7]], [("X", 0)], [2]
      )
      cpd_z_2 = TabularCPD(
          ("Z", 1), 2, [[0.4, 0.7], [0.6, 0.3]], [("Z", 0)], [2]
      )
      dbn_2.add_cpds(cpd_x_2, cpd_y_2, cpd_z_2, cpd_start_z_2)
      dbn_2.initialize_initial_state()
      self.dbn_inference_2 = DBNInference(dbn_2)
  
file_path: pgmpy/pgmpy/tests/test_inference/test_dbn_inference.py
imports: import unittest
  import numpy
  import numpy.testing
  from scipy.special import softmax
  from pgmpy.inference import DBNInference
  from pgmpy.models import DynamicBayesianNetwork
  from pgmpy.factors.discrete import TabularCPD
label_desc: Use image node_id 1 for calling the TestDBNInference obj's underlying member method code with example usage: obj.setUp() without return types