class_docstr: Read a GraphML document.  Produces NetworkX graph objects.
class_docstr_tok: ["Read","a","GraphML","document",".","Produces","NetworkX","graph","objects","."]
docstr: Add a node to the graph.
docstr_tok: ["Add","a","node","to","the","graph","."]
code: def add_node(self, G, node_xml, graphml_keys, defaults):
      """Add a node to the graph."""
      # warn on finding unsupported ports tag
      ports = node_xml.find(f"{{{self.NS_GRAPHML}}}port")
      if ports is not None:
          warnings.warn("GraphML port tag not supported.")
      # find the node by id and cast it to the appropriate type
      node_id = self.node_type(node_xml.get("id"))
      # get data/attributes for node
      data = self.decode_data_elements(graphml_keys, node_xml)
      G.add_node(node_id, **data)
      # get child nodes
      if node_xml.attrib.get("yfiles.foldertype") == "group":
          graph_xml = node_xml.find(f"{{{self.NS_GRAPHML}}}graph")
          self.make_graph(graph_xml, graphml_keys, defaults, G)
  
imports: import warnings
  from collections import defaultdict
  import networkx
  from networkx.utils import open_file
label_desc: Use image node_id 4 for calling the GraphMLReader obj's underlying member method code with example usage: obj.add_node(G, node_xml, graphml_keys, defaults) without return types