code: def test_undirected_edge_in_directed(self):
      s = """<?xml version="1.0" encoding="UTF-8"?>
  <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">
    <graph id="G" edgedefault='directed'>
      <node id="n0"/>
      <node id="n1"/>
      <node id="n2"/>
      <edge source="n0" target="n1"/>
      <edge source="n1" target="n2" directed='false'/>
    </graph>
  </graphml>"""
      fh = io.BytesIO(s.encode("UTF-8"))
      pytest.raises(nx.NetworkXError, nx.read_graphml, fh)
      pytest.raises(nx.NetworkXError, nx.parse_graphml, s)
  
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 9 for calling the TestReadGraphML obj's underlying member method code with example usage: obj.test_undirected_edge_in_directed() without return types