class_docstr: Initializer for XBNReader class.
  
  Parameters
  ----------
  path: str or file
      Path of the file containing XBN data.
  
  string: str
      String of XBN data
  
  Examples
  --------
  >>> reader = XBNReader('test_XBN.xml')
  
  Reference
  ---------
  [1] Microsoft Research. XML belief network file format.
      http://xml.coverpages.org/xbn-MSdefault19990414.html, 1999.
class_docstr_tok: ["Initializer","for","XBNReader","class",".","Parameters","--","--","--","--","--","path",":","str","or","file","Path","of","the","file","containing","XBN","data",".","string",":","str","String","of","XBN","data","Examples","--","--","--","--",">",">",">","reader","=","XBNReader","(","'test_XBN.xml","'",")","Reference","--","--","--","--","-","[","1","]","Microsoft","Research",".","XML","belief","network","file","format",".","http",":","\/\/xml.coverpages.org\/xbn-MSdefault19990414.html",",","1999","."]
docstr: Returns an instance of Bayesian Model.
docstr_tok: ["Returns","an","instance","of","Bayesian","Model","."]
code: def get_model(self):
      """
      Returns an instance of Bayesian Model.
      """
      model = BayesianNetwork()
      model.add_nodes_from(self.variables)
      model.add_edges_from(self.edges)
      model.name = self.model_name
  
      tabular_cpds = []
      for var, values in self.variable_CPD.items():
          evidence = values["CONDSET"] if "CONDSET" in values else []
          cpd = values["DPIS"]
          evidence_card = (
              values["CARDINALITY"] if "CARDINALITY" in values else []
          )
          states = self.variables[var]["STATES"]
          cpd = TabularCPD(
              var,
              len(states),
              cpd,
              evidence=evidence,
              evidence_card=evidence_card,
          )
          tabular_cpds.append(cpd)
  
      model.add_cpds(*tabular_cpds)
      for var, properties in self.variables.items():
          model._node[var] = properties
  
      return model
  
imports: import itertools
  import xml.etree.ElementTree
  import networkx
  import numpy
  from pgmpy.factors.discrete import TabularCPD
  from pgmpy.models import BayesianNetwork
label_desc: Use image node_id 8 for calling the XBNReader obj's underlying member method code with example usage: obj.get_model() and returns: model