code: def setUp(self):
      self.maxDiff = None
      variables = [
          "kid",
          "bowel-problem",
          "dog-out",
          "family-out",
          "hear-bark",
          "light-on",
      ]
      edges = [
          ["family-out", "dog-out"],
          ["bowel-problem", "dog-out"],
          ["family-out", "light-on"],
          ["dog-out", "hear-bark"],
      ]
      cpds = {
          "kid": np.array([[0.3], [0.7]]),
          "bowel-problem": np.array([[0.01], [0.99]]),
          "dog-out": np.array(
              [[0.99, 0.01, 0.97, 0.03], [0.9, 0.1, 0.3, 0.7]]
          ),
          "family-out": np.array([[0.15], [0.85]]),
          "hear-bark": np.array([[0.7, 0.3], [0.01, 0.99]]),
          "light-on": np.array([[0.6, 0.4], [0.05, 0.95]]),
      }
      states = {
          "kid": ["true", "false"],
          "bowel-problem": ["true", "false"],
          "dog-out": ["true", "false"],
          "family-out": ["true", "false"],
          "hear-bark": ["true", "false"],
          "light-on": ["true", "false"],
      }
      parents = {
          "kid": [],
          "bowel-problem": [],
          "dog-out": ["bowel-problem", "family-out"],
          "family-out": [],
          "hear-bark": ["dog-out"],
          "light-on": ["family-out"],
      }
  
      self.bayesmodel = BayesianNetwork()
      self.bayesmodel.add_nodes_from(variables)
      self.bayesmodel.add_edges_from(edges)
  
      tabular_cpds = []
      for var, values in cpds.items():
          cpd = TabularCPD(
              var,
              len(states[var]),
              values,
              evidence=parents[var],
              evidence_card=[
                  len(states[evidence_var])
                  for evidence_var in parents[var]
              ],
          )
          tabular_cpds.append(cpd)
      self.bayesmodel.add_cpds(*tabular_cpds)
      self.bayeswriter = UAIWriter(self.bayesmodel)
  
      edges = {
          ("var_0", "var_1"),
          ("var_0", "var_2"),
          ("var_1", "var_2"),
      }
      self.markovmodel = MarkovNetwork(edges)
      tables = [
          (["var_0", "var_1"], ["4.000", "2.400", "1.000", "0.000"]),
          (
              ["var_0", "var_1", "var_2"],
              [
                  "2.2500",
                  "3.2500",
                  "3.7500",
                  "0.0000",
                  "0.0000",
                  "10.0000",
                  "1.8750",
                  "4.0000",
                  "3.3330",
                  "2.0000",
                  "2.0000",
                  "3.4000",
              ],
          ),
      ]
      domain = {"var_1": "2", "var_2": "3", "var_0": "2"}
      factors = []
      for table in tables:
          variables = table[0]
          cardinality = [int(domain[var]) for var in variables]
          values = list(map(float, table[1]))
          factor = DiscreteFactor(variables, cardinality, values)
          factors.append(factor)
      self.markovmodel.add_factors(*factors)
      self.markovwriter = UAIWriter(self.markovmodel)
  
imports: import unittest
  import networkx
  import numpy
  from pgmpy import config
  from pgmpy.factors.discrete import DiscreteFactor, TabularCPD
  from pgmpy.models import BayesianNetwork, MarkovNetwork
  from pgmpy.readwrite import UAIReader, UAIWriter
label_desc: Use image node_id 1 for calling the TestUAIWriter obj's underlying member method code with example usage: obj.setUp() without return types