class_docstr: Initialize an instance of UAI reader class
  
  Parameters
  ----------
  path : file or str
      Path of the file containing UAI information.
  
  string : str
      String containing UAI information.
  
  Examples
  --------
  >>> from pgmpy.readwrite import UAIReader
  >>> reader = UAIReader('TestUai.uai')
  >>> model = reader.get_model()
  
  Reference
  ---------
  [1] https://uaicompetition.github.io/uci-2022/file-formats/model-format/
  [2] https://forgemia.inra.fr/thomas.schiex/toulbar2/-/blob/master/doc/UAI08Format.txt
code: def __init__(self, path=None, string=None):
      if path:
          with open(path, "r") as f:
              self.network = f.read()
      elif string:
          self.network = string
      else:
          raise ValueError("Must specify either path or string.")
  
      if "#" in self.network:
          self.network = (
              Regex("#.*").suppress().transformString(self.network)
          )  # removing comments from the file
  
      self.grammar = self.get_grammar()
      self.network_type = self.get_network_type()
      self.variables = self.get_variables()
      self.domain = self.get_domain()
      self.edges = self.get_edges()
      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 UAIReader object from inherited base classes: object with example: obj = UAIReader(path, string)