docstr: 创建一个新node并将node添加到root_node下
docstr_tok: ["\u521b\u5efa\u4e00\u4e2a\u65b0node\u5e76\u5c06node\u6dfb\u52a0\u5230root_node\u4e0b"]
code: def create_append_node(self, node_name, root_node=None):
      """创建一个新node并将node添加到root_node下"""
      new_node = self.doc.createElement(node_name)
      if root_node is not None:
          root_node.appendChild(new_node)
      else:
          self.doc.appendChild(new_node)
      return new_node
  
file_path: deep-learning-for-image-processing/others_project/trans_widerface_to_xml/create_xml.py
imports: import copy
  import os
  from xml.dom import minidom
label_desc: Use image node_id 2 for calling the XMLGenerator obj's underlying member method code with example usage: obj.create_append_node(node_name, root_node) and returns: new_node