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 the observation function as nested dict in the case of table-
  type parameter and a nested structure in case of
  decision diagram parameter
  
  Example
  --------
  >>> reader = PomdpXReader('Test_PomdpX.xml')
  >>> reader.get_obs_function()
  [{'Var': 'obs_sensor',
        'Parent': ['action_rover', 'rover_1', 'rock_1'],
        'Type': 'TBL',
        'Parameter': [{'Instance': ['amw', '*', '*', '-'],
                       'ProbTable': ['1.0', '0.0']},
                   ...
                  ]
  }]
docstr_tok: ["Returns","the","observation","function","as","nested","dict","in","the","case","of","table-","type","parameter","and","a","nested","structure","in","case","of","decision","diagram","parameter","Example","--","--","--","--",">",">",">","reader","=","PomdpXReader","(","'Test_PomdpX.xml","'",")",">",">",">","reader.get_obs_function","(",")","[","{","'Var","'",":","'obs_sensor","'",",","'Parent","'",":","[","'action_rover","'",",","'rover_1","'",",","'rock_1","'","]",",","'Type","'",":","'TBL","'",",","'Parameter","'",":","[","{","'Instance","'",":","[","'amw","'",",","'","*","'",",","'","*","'",",","'-","'","]",",","'ProbTable","'",":","[","'","1.0","'",",","'","0.0","'","]","}",",","...","]","}","]"]
code: def get_obs_function(self):
      """
      Returns the observation function as nested dict in the case of table-
      type parameter and a nested structure in case of
      decision diagram parameter
  
      Example
      --------
      >>> reader = PomdpXReader('Test_PomdpX.xml')
      >>> reader.get_obs_function()
      [{'Var': 'obs_sensor',
            'Parent': ['action_rover', 'rover_1', 'rock_1'],
            'Type': 'TBL',
            'Parameter': [{'Instance': ['amw', '*', '*', '-'],
                           'ProbTable': ['1.0', '0.0']},
                       ...
                      ]
      }]
      """
      obs_function = []
      for variable in self.network.findall("ObsFunction"):
          for var in variable.findall("CondProb"):
              cond_prob = defaultdict(list)
              cond_prob["Var"] = var.find("Var").text
              cond_prob["Parent"] = var.find("Parent").text.split()
              if not var.find("Parameter").get("type"):
                  cond_prob["Type"] = "TBL"
              else:
                  cond_prob["Type"] = var.find("Parameter").get("type")
              cond_prob["Parameter"] = self.get_parameter(var)
              obs_function.append(cond_prob)
  
      return obs_function
  
imports: import xml.etree.ElementTree
  from collections import defaultdict
label_desc: Use image node_id 7 for calling the PomdpXReader obj's underlying member method code with example usage: obj.get_obs_function() and returns: obs_function