class_docstr: Initialize an instance of PomdpX reader class
  
  Parameters
  ----------
  path : file or str
      Path of the file containing PomdpX information.
  
  string : str
      String containing PomdpX information.
  
  Example
  -------
  reader = PomdpXReader('TestPomdpX.xml')
  
  Reference
  ---------
  http://bigbird.comp.nus.edu.sg/pmwiki/farm/appl/index.php?n=Main.PomdpXDocumentation
class_docstr_tok: ["Initialize","an","instance","of","PomdpX","reader","class","Parameters","--","--","--","--","--","path",":","file","or","str","Path","of","the","file","containing","PomdpX","information",".","string",":","str","String","containing","PomdpX","information",".","Example","--","--","--","-","reader","=","PomdpXReader","(","'TestPomdpX.xml","'",")","Reference","--","--","--","--","-","http",":","\/\/bigbird.comp.nus.edu.sg\/pmwiki\/farm\/appl\/index.php","?","n=Main.PomdpXDocumentation"]
docstr: Returns list of variables of the network
  
  Example
  -------
  >>> reader = PomdpXReader("pomdpx.xml")
  >>> reader.get_variables()
  {'StateVar': [
                  {'vnamePrev': 'rover_0',
                   'vnameCurr': 'rover_1',
                   'ValueEnum': ['s0', 's1', 's2'],
                   'fullyObs': True},
                  {'vnamePrev': 'rock_0',
                   'vnameCurr': 'rock_1',
                   'fullyObs': False,
                   'ValueEnum': ['good', 'bad']}],
                  'ObsVar': [{'vname': 'obs_sensor',
                              'ValueEnum': ['ogood', 'obad']}],
                  'RewardVar': [{'vname': 'reward_rover'}],
                  'ActionVar': [{'vname': 'action_rover',
                                 'ValueEnum': ['amw', 'ame',
                                               'ac', 'as']}]
                  }
docstr_tok: ["Returns","list","of","variables","of","the","network","Example","--","--","--","-",">",">",">","reader","=","PomdpXReader","(","``","pomdpx.xml","''",")",">",">",">","reader.get_variables","(",")","{","'StateVar","'",":","[","{","'vnamePrev","'",":","'rover_0","'",",","'vnameCurr","'",":","'rover_1","'",",","'ValueEnum","'",":","[","'s0","'",",","'s1","'",",","'s2","'","]",",","'fullyObs","'",":","True","}",",","{","'vnamePrev","'",":","'rock_0","'",",","'vnameCurr","'",":","'rock_1","'",",","'fullyObs","'",":","False",",","'ValueEnum","'",":","[","'good","'",",","'bad","'","]","}","]",",","'ObsVar","'",":","[","{","'vname","'",":","'obs_sensor","'",",","'ValueEnum","'",":","[","'ogood","'",",","'obad","'","]","}","]",",","'RewardVar","'",":","[","{","'vname","'",":","'reward_rover","'","}","]",",","'ActionVar","'",":","[","{","'vname","'",":","'action_rover","'",",","'ValueEnum","'",":","[","'amw","'",",","'ame","'",",","'ac","'",",","'as","'","]","}","]","}"]
code: def get_variables(self):
      """
      Returns list of variables of the network
  
      Example
      -------
      >>> reader = PomdpXReader("pomdpx.xml")
      >>> reader.get_variables()
      {'StateVar': [
                      {'vnamePrev': 'rover_0',
                       'vnameCurr': 'rover_1',
                       'ValueEnum': ['s0', 's1', 's2'],
                       'fullyObs': True},
                      {'vnamePrev': 'rock_0',
                       'vnameCurr': 'rock_1',
                       'fullyObs': False,
                       'ValueEnum': ['good', 'bad']}],
                      'ObsVar': [{'vname': 'obs_sensor',
                                  'ValueEnum': ['ogood', 'obad']}],
                      'RewardVar': [{'vname': 'reward_rover'}],
                      'ActionVar': [{'vname': 'action_rover',
                                     'ValueEnum': ['amw', 'ame',
                                                   'ac', 'as']}]
                      }
      """
      self.variables = defaultdict(list)
      for variable in self.network.findall("Variable"):
          _variables = defaultdict(list)
          for var in variable.findall("StateVar"):
              state_variables = defaultdict(list)
              state_variables["vnamePrev"] = var.get("vnamePrev")
              state_variables["vnameCurr"] = var.get("vnameCurr")
              if var.get("fullyObs"):
                  state_variables["fullyObs"] = True
              else:
                  state_variables["fullyObs"] = False
              state_variables["ValueEnum"] = []
              if var.find("NumValues") is not None:
                  for i in range(0, int(var.find("NumValues").text)):
                      state_variables["ValueEnum"].append("s" + str(i))
              if var.find("ValueEnum") is not None:
                  state_variables["ValueEnum"] = var.find(
                      "ValueEnum"
                  ).text.split()
              _variables["StateVar"].append(state_variables)
  
          for var in variable.findall("ObsVar"):
              obs_variables = defaultdict(list)
              obs_variables["vname"] = var.get("vname")
              obs_variables["ValueEnum"] = var.find(
                  "ValueEnum"
              ).text.split()
              _variables["ObsVar"].append(obs_variables)
  
          for var in variable.findall("ActionVar"):
              action_variables = defaultdict(list)
              action_variables["vname"] = var.get("vname")
              action_variables["ValueEnum"] = var.find(
                  "ValueEnum"
              ).text.split()
              _variables["ActionVar"].append(action_variables)
  
          for var in variable.findall("RewardVar"):
              reward_variables = defaultdict(list)
              reward_variables["vname"] = var.get("vname")
              _variables["RewardVar"].append(reward_variables)
  
          self.variables.update(_variables)
  
      return self.variables
  
imports: import xml.etree.ElementTree
  from collections import defaultdict
label_desc: Use image node_id 4 for calling the PomdpXReader obj's underlying member method code with example usage: obj.get_variables() and returns: self