code: def test_graphml_header_line(self):
      good = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <graphml xmlns="http://graphml.graphdrawing.org/xmlns"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns
           http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
    <key id="d0" for="node" attr.name="test" attr.type="boolean">
      <default>false</default>
    </key>
    <graph id="G">
      <node id="n0">
        <data key="d0">true</data>
      </node>
    </graph>
  </graphml>
  """
      bad = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <graphml>
    <key id="d0" for="node" attr.name="test" attr.type="boolean">
      <default>false</default>
    </key>
    <graph id="G">
      <node id="n0">
        <data key="d0">true</data>
      </node>
    </graph>
  </graphml>
  """
      ugly = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <graphml xmlns="https://ghghgh">
    <key id="d0" for="node" attr.name="test" attr.type="boolean">
      <default>false</default>
    </key>
    <graph id="G">
      <node id="n0">
        <data key="d0">true</data>
      </node>
    </graph>
  </graphml>
  """
      for s in (good, bad):
          fh = io.BytesIO(s.encode("UTF-8"))
          G = nx.read_graphml(fh)
          H = nx.parse_graphml(s)
          for graph in [G, H]:
              assert graph.nodes["n0"]["test"]
  
      fh = io.BytesIO(ugly.encode("UTF-8"))
      pytest.raises(nx.NetworkXError, nx.read_graphml, fh)
      pytest.raises(nx.NetworkXError, nx.parse_graphml, ugly)
  
imports: import io
  import pytest
  import networkx
  from networkx.readwrite.graphml import GraphMLWriter
  from networkx.utils import edges_equal, nodes_equal
label_desc: Use image node_id 16 for calling the TestReadGraphML obj's underlying member method code with example usage: obj.test_graphml_header_line() without return types