docs: def _populate_bunch_with_element(element):
      """
      Helper function to recursively populates a Bunch from an XML tree.
      Returns leaf XML elements as a simple value, branch elements are returned
      as Bunches containing their subelements as value or recursively generated
      Bunch members.
      """
      if 'value' in element.attrib:
          return element.get('value')
      current_bunch = Bunch()
  
      if element.get('id'):
          current_bunch['nextra_element_id'] = element.get('id')
      for subelement in element.getchildren():
          current_bunch[subelement.tag] = _populate_bunch_with_element(
              subelement)
      return current_bunch