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: Inplace prettyprint formatter.
docstr_tok: ["Inplace","prettyprint","formatter","."]
code: def indent(self, elem, level=0):
      """
      Inplace prettyprint formatter.
      """
      i = "\n" + level * "  "
      if len(elem):
          if not elem.text or not elem.text.strip():
              elem.text = i + "  "
          if not elem.tail or not elem.tail.strip():
              elem.tail = i
          for elem in elem:
              self.indent(elem, level + 1)
          if not elem.tail or not elem.tail.strip():
              elem.tail = i
      else:
          if level and (not elem.tail or not elem.tail.strip()):
              elem.tail = i
  
imports: import xml.etree.ElementTree
  from collections import defaultdict
label_desc: Use image node_id 3 for calling the PomdpXWriter obj's underlying member method code with example usage: obj.indent(elem, level) without return types