code: def add_parents(self, node_element, node_data):
      parents = node_data.pop("parents", False)
      if parents:
          parents_element = Element("parents")
          for p in parents:
              e = Element("parent")
              e.attrib["for"] = str(p)
              parents_element.append(e)
          node_element.append(parents_element)
      return node_data
  
imports: import itertools
  import time
  from xml.etree.ElementTree import Element, ElementTree, SubElement, register_namespace, tostring
  import networkx
  from networkx.utils import open_file
label_desc: Use image node_id 9 for calling the GEXFWriter obj's underlying member method code with example usage: obj.add_parents(node_element, node_data) and returns: node_data