class_docstr: Initialize an instance of UAI writer class
  
  Parameters
  ----------
  model: A Bayesian or Markov model
      The model to write
  
  round_values: int (default: None)
      The number to decimals to which to round the probability values. If None, keeps all decimals points.
  
  Examples
  --------
  >>> from pgmpy.readwrite import UAIWriter
  >>> from pgmpy.utils import get_example_model
  >>> model = get_example_model('asia')
  >>> writer = UAIWriter(asia)
  >>> writer.write_uai('asia.uai')
code: def __init__(self, model, round_values=None):
      if isinstance(model, BayesianNetwork):
          self.network = "BAYES\n"
      elif isinstance(model, MarkovNetwork):
          self.network = "MARKOV\n"
      else:
          raise TypeError(
              "Model must be an instance of Bayesian or Markov model."
          )
  
      self.model = model
      self.round_values = round_values
      self.no_nodes = self.get_nodes()
      self.domain = self.get_domain()
      self.functions = self.get_functions()
      self.tables = self.get_tables()
  
imports: from itertools import combinations
  import numpy
  from pyparsing import Combine, Literal, Optional, Regex, Word, alphas, nums
  from pgmpy.factors.discrete import DiscreteFactor, TabularCPD
  from pgmpy.models import BayesianNetwork, MarkovNetwork
  from pgmpy.utils import compat_fns
label_desc: Use image node_id 1 to create a new UAIWriter object from inherited base classes: object with example: obj = UAIWriter(model, round_values)