code: def construct_types(self):
      types = [
          (int, "integer"),
          (float, "float"),
          (float, "double"),
          (bool, "boolean"),
          (list, "string"),
          (dict, "string"),
          (int, "long"),
          (str, "liststring"),
          (str, "anyURI"),
          (str, "string"),
      ]
  
      # These additions to types allow writing numpy types
      try:
          import numpy as np
      except ImportError:
          pass
      else:
          # prepend so that python types are created upon read (last entry wins)
          types = [
              (np.float64, "float"),
              (np.float32, "float"),
              (np.float16, "float"),
              (np.int_, "int"),
              (np.int8, "int"),
              (np.int16, "int"),
              (np.int32, "int"),
              (np.int64, "int"),
              (np.uint8, "int"),
              (np.uint16, "int"),
              (np.uint32, "int"),
              (np.uint64, "int"),
              (np.int_, "int"),
              (np.intc, "int"),
              (np.intp, "int"),
          ] + types
  
      self.xml_type = dict(types)
      self.python_type = dict(reversed(a) for a in types)
  
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 1 for calling the GEXF obj's underlying member method code with example usage: obj.construct_types() without return types