code: def add_viz(self, element, node_data):
      viz = node_data.pop("viz", False)
      if viz:
          color = viz.get("color")
          if color is not None:
              if self.VERSION == "1.1":
                  e = Element(
                      f"{{{self.NS_VIZ}}}color",
                      r=str(color.get("r")),
                      g=str(color.get("g")),
                      b=str(color.get("b")),
                  )
              else:
                  e = Element(
                      f"{{{self.NS_VIZ}}}color",
                      r=str(color.get("r")),
                      g=str(color.get("g")),
                      b=str(color.get("b")),
                      a=str(color.get("a", 1.0)),
                  )
              element.append(e)
  
          size = viz.get("size")
          if size is not None:
              e = Element(f"{{{self.NS_VIZ}}}size", value=str(size))
              element.append(e)
  
          thickness = viz.get("thickness")
          if thickness is not None:
              e = Element(
                  f"{{{self.NS_VIZ}}}thickness", value=str(thickness)
              )
              element.append(e)
  
          shape = viz.get("shape")
          if shape is not None:
              if shape.startswith("http"):
                  e = Element(
                      f"{{{self.NS_VIZ}}}shape",
                      value="image",
                      uri=str(shape),
                  )
              else:
                  e = Element(
                      f"{{{self.NS_VIZ}}}shape", value=str(shape)
                  )
              element.append(e)
  
          position = viz.get("position")
          if position is not None:
              e = Element(
                  f"{{{self.NS_VIZ}}}position",
                  x=str(position.get("x")),
                  y=str(position.get("y")),
                  z=str(position.get("z")),
              )
              element.append(e)
      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 8 for calling the GEXFWriter obj's underlying member method code with example usage: obj.add_viz(element, node_data) and returns: node_data