class_docstr: This class is the base class for settings files.
class_docstr_tok: ["This","class","is","the","base","class","for","settings","files","."]
docstr: Return the contents of toolbox settings file with a nested structure.
  
  :param encoding: encoding used by settings file
  :type encoding: str
  :param errors: Error handling scheme for codec. Same as ``decode()`` builtin method.
  :type errors: str
  :param kwargs: Keyword arguments passed to ``StandardFormat.fields()``
  :type kwargs: dict
  :rtype: ElementTree._ElementInterface
docstr_tok: ["Return","the","contents","of","toolbox","settings","file","with","a","nested","structure",".",":","param","encoding",":","encoding","used","by","settings","file",":","type","encoding",":","str",":","param","errors",":","Error","handling","scheme","for","codec",".","Same","as","``","decode","(",")","``","builtin","method",".",":","type","errors",":","str",":","param","kwargs",":","Keyword","arguments","passed","to","``","StandardFormat.fields","(",")","``",":","type","kwargs",":","dict",":","rtype",":","ElementTree._ElementInterface"]
code: def parse(self, encoding=None, errors="strict", **kwargs):
      """
      Return the contents of toolbox settings file with a nested structure.
  
      :param encoding: encoding used by settings file
      :type encoding: str
      :param errors: Error handling scheme for codec. Same as ``decode()`` builtin method.
      :type errors: str
      :param kwargs: Keyword arguments passed to ``StandardFormat.fields()``
      :type kwargs: dict
      :rtype: ElementTree._ElementInterface
      """
      builder = TreeBuilder()
      for mkr, value in self.fields(
          encoding=encoding, errors=errors, **kwargs
      ):
          # Check whether the first char of the field marker
          # indicates a block start (+) or end (-)
          block = mkr[0]
          if block in ("+", "-"):
              mkr = mkr[1:]
          else:
              block = None
          # Build tree on the basis of block char
          if block == "+":
              builder.start(mkr, {})
              builder.data(value)
          elif block == "-":
              builder.end(mkr)
          else:
              builder.start(mkr, {})
              builder.data(value)
              builder.end(mkr)
      return builder.close()
  
imports: import codecs
  import re
  from io import StringIO
  from xml.etree.ElementTree import Element, ElementTree, SubElement, TreeBuilder
  from nltk.data import PathPointer, find
label_desc: Use image node_id 2 for calling the ToolboxSettings obj's underlying member method code with example usage: obj.parse(encoding, errors) and returns: builder