class_docstr: Initialise a XMLBIFWriter object.
  
  Parameters
  ----------
  model: BayesianNetwork Instance
      Model to write
  
  encoding: str (optional)
      Encoding for text data
  
  prettyprint: Bool(optional)
      Indentation in output XML if true
  
  Examples
  --------
  >>> from pgmpy.readwrite import XMLBIFWriter
  >>> from pgmpy.utils import get_example_model
  >>> model = get_example_model('asia')
  >>> writer = XMLBIFWriter(model)
  >>> writer.write_xmlbif('asia.xml')
  
  Reference
  ---------
  [1] https://www.cs.cmu.edu/afs/cs/user/fgcozman/www/Research/InterchangeFormat/
docstr: Add variables to XMLBIF
  
  Return
  ------
  dict: dict of type {variable: variable tags}
  
  Examples
  --------
  >>> writer = XMLBIFWriter(model)
  >>> writer.get_variables()
  {'bowel-problem': <Element VARIABLE at 0x7fe28607dd88>,
   'family-out': <Element VARIABLE at 0x7fe28607de08>,
   'hear-bark': <Element VARIABLE at 0x7fe28607de48>,
   'dog-out': <Element VARIABLE at 0x7fe28607ddc8>,
   'light-on': <Element VARIABLE at 0x7fe28607de88>}
docstr_tok: ["Add","variables","to","XMLBIF","Return","--","--","--","dict",":","dict","of","type","{","variable",":","variable","tags","}","Examples","--","--","--","--",">",">",">","writer","=","XMLBIFWriter","(","model",")",">",">",">","writer.get_variables","(",")","{","'bowel-problem","'",":","<","Element","VARIABLE","at","0x7fe28607dd88",">",",","'family-out","'",":","<","Element","VARIABLE","at","0x7fe28607de08",">",",","'hear-bark","'",":","<","Element","VARIABLE","at","0x7fe28607de48",">",",","'dog-out","'",":","<","Element","VARIABLE","at","0x7fe28607ddc8",">",",","'light-on","'",":","<","Element","VARIABLE","at","0x7fe28607de88",">","}"]
code: def get_variables(self):
      """
      Add variables to XMLBIF
  
      Return
      ------
      dict: dict of type {variable: variable tags}
  
      Examples
      --------
      >>> writer = XMLBIFWriter(model)
      >>> writer.get_variables()
      {'bowel-problem': <Element VARIABLE at 0x7fe28607dd88>,
       'family-out': <Element VARIABLE at 0x7fe28607de08>,
       'hear-bark': <Element VARIABLE at 0x7fe28607de48>,
       'dog-out': <Element VARIABLE at 0x7fe28607ddc8>,
       'light-on': <Element VARIABLE at 0x7fe28607de88>}
      """
      variables = self.model.nodes()
      variable_tag = {}
      for var in sorted(variables):
          variable_tag[var] = etree.SubElement(
              self.network, "VARIABLE", attrib={"TYPE": "nature"}
          )
          etree.SubElement(variable_tag[var], "NAME").text = var
      return variable_tag
  
imports: import xml.etree.ElementTree
  from io import BytesIO
  from itertools import chain
  import numpy
  import pyparsing
  from pgmpy.factors.discrete import State, TabularCPD
  from pgmpy.models import BayesianNetwork
  from pgmpy.utils import compat_fns
label_desc: Use image node_id 4 for calling the XMLBIFWriter obj's underlying member method code with example usage: obj.get_variables() and returns: variable_tag