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')
docstr: Write the xml data into the file.
  
  Parameters
  ----------
  filename: Name of the file.
  
  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')
docstr_tok: ["Write","the","xml","data","into","the","file",".","Parameters","--","--","--","--","--","filename",":","Name","of","the","file",".","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 write_uai(self, filename):
      """
      Write the xml data into the file.
  
      Parameters
      ----------
      filename: Name of the file.
  
      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')
      """
      writer = self.__str__()
      with open(filename, "w") as fout:
          fout.write(writer)
  
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 7 for calling the UAIWriter obj's underlying member method code with example usage: obj.write_uai(filename) without return types