class_docstr: Initialise a PomdpXWriter Object
  
  Parameters
  ----------
      model: A Bayesian of Markov Model
          The model to write
  
  encoding: String(optional)
      Encoding for text data
  
  prettyprint: Bool(optional)
      Indentation in output XML if true
class_docstr_tok: ["Initialise","a","PomdpXWriter","Object","Parameters","--","--","--","--","--","model",":","A","Bayesian","of","Markov","Model","The","model","to","write","encoding",":","String","(","optional",")","Encoding","for","text","data","prettyprint",":","Bool","(","optional",")","Indentation","in","output","XML","if","true"]
docstr: helper function for adding parameters in condition
  
  Parameters
  ---------------
  dag_tag: etree SubElement
           the DAG tag is contained in this subelement
  node_dict: dictionary
             the decision diagram dictionary
  
  Return
  ---------------
  None
docstr_tok: ["helper","function","for","adding","parameters","in","condition","Parameters","--","--","--","--","--","--","--","-","dag_tag",":","etree","SubElement","the","DAG","tag","is","contained","in","this","subelement","node_dict",":","dictionary","the","decision","diagram","dictionary","Return","--","--","--","--","--","--","--","-","None"]
code: def add_parameter_dd(self, dag_tag, node_dict):
      """
      helper function for adding parameters in condition
  
      Parameters
      ---------------
      dag_tag: etree SubElement
               the DAG tag is contained in this subelement
      node_dict: dictionary
                 the decision diagram dictionary
  
      Return
      ---------------
      None
      """
      if isinstance(node_dict, defaultdict) or isinstance(
          node_dict, dict
      ):
          node_tag = etree.SubElement(
              dag_tag,
              "Node",
              attrib={"var": next(iter(node_dict.keys()))},
          )
          edge_dict = next(iter(node_dict.values()))
          for edge in sorted(edge_dict.keys(), key=tuple):
              edge_tag = etree.SubElement(
                  node_tag, "Edge", attrib={"val": edge}
              )
              value = edge_dict.get(edge)
              if isinstance(value, str):
                  terminal_tag = etree.SubElement(edge_tag, "Terminal")
                  terminal_tag.text = value
              elif "type" in value:
                  if "val" in value:
                      etree.SubElement(
                          edge_tag,
                          "SubDAG",
                          attrib={
                              "type": value["type"],
                              "var": value["var"],
                              "val": value["val"],
                          },
                      )
                  elif "idref" in value:
                      etree.SubElement(
                          edge_tag,
                          "SubDAG",
                          attrib={
                              "type": value["type"],
                              "idref": value["idref"],
                          },
                      )
                  else:
                      etree.SubElement(
                          edge_tag,
                          "SubDAG",
                          attrib={
                              "type": value["type"],
                              "var": value["var"],
                          },
                      )
              else:
                  self.add_parameter_dd(edge_tag, value)
  
imports: import xml.etree.ElementTree
  from collections import defaultdict
label_desc: Use image node_id 6 for calling the PomdpXWriter obj's underlying member method code with example usage: obj.add_parameter_dd(dag_tag, node_dict) without return types