code: def test_read_attributes_with_groups(self):
      data = """\
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:java="http://www.yworks.com/xml/yfiles-common/1.0/java" xmlns:sys="http://www.yworks.com/xml/yfiles-common/markup/primitives/2.0" xmlns:x="http://www.yworks.com/xml/yfiles-common/markup/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd">
    <!--Created by yEd 3.17-->
    <key attr.name="Description" attr.type="string" for="graph" id="d0"/>
    <key for="port" id="d1" yfiles.type="portgraphics"/>
    <key for="port" id="d2" yfiles.type="portgeometry"/>
    <key for="port" id="d3" yfiles.type="portuserdata"/>
    <key attr.name="CustomProperty" attr.type="string" for="node" id="d4">
      <default/>
    </key>
    <key attr.name="url" attr.type="string" for="node" id="d5"/>
    <key attr.name="description" attr.type="string" for="node" id="d6"/>
    <key for="node" id="d7" yfiles.type="nodegraphics"/>
    <key for="graphml" id="d8" yfiles.type="resources"/>
    <key attr.name="url" attr.type="string" for="edge" id="d9"/>
    <key attr.name="description" attr.type="string" for="edge" id="d10"/>
    <key for="edge" id="d11" yfiles.type="edgegraphics"/>
    <graph edgedefault="directed" id="G">
      <data key="d0"/>
      <node id="n0">
        <data key="d4"><![CDATA[CustomPropertyValue]]></data>
        <data key="d6"/>
        <data key="d7">
          <y:ShapeNode>
            <y:Geometry height="30.0" width="30.0" x="125.0" y="-255.4611111111111"/>
            <y:Fill color="#FFCC00" transparent="false"/>
            <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
            <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">2<y:LabelModel>
                <y:SmartNodeLabelModel distance="4.0"/>
              </y:LabelModel>
              <y:ModelParameter>
                <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
              </y:ModelParameter>
            </y:NodeLabel>
            <y:Shape type="rectangle"/>
          </y:ShapeNode>
        </data>
      </node>
      <node id="n1" yfiles.foldertype="group">
        <data key="d4"><![CDATA[CustomPropertyValue]]></data>
        <data key="d5"/>
        <data key="d6"/>
        <data key="d7">
          <y:ProxyAutoBoundsNode>
            <y:Realizers active="0">
              <y:GroupNode>
                <y:Geometry height="250.38333333333333" width="140.0" x="-30.0" y="-330.3833333333333"/>
                <y:Fill color="#F5F5F5" transparent="false"/>
                <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
                <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="140.0" x="0.0" y="0.0">Group 3</y:NodeLabel>
                <y:Shape type="roundrectangle"/>
                <y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
                <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
                <y:BorderInsets bottom="1" bottomF="1.0" left="0" leftF="0.0" right="0" rightF="0.0" top="1" topF="1.0001736111111086"/>
              </y:GroupNode>
              <y:GroupNode>
                <y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/>
                <y:Fill color="#F5F5F5" transparent="false"/>
                <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
                <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="65.201171875" x="-7.6005859375" y="0.0">Folder 3</y:NodeLabel>
                <y:Shape type="roundrectangle"/>
                <y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
                <y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
                <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
              </y:GroupNode>
            </y:Realizers>
          </y:ProxyAutoBoundsNode>
        </data>
        <graph edgedefault="directed" id="n1:">
          <node id="n1::n0" yfiles.foldertype="group">
            <data key="d4"><![CDATA[CustomPropertyValue]]></data>
            <data key="d5"/>
            <data key="d6"/>
            <data key="d7">
              <y:ProxyAutoBoundsNode>
                <y:Realizers active="0">
                  <y:GroupNode>
                    <y:Geometry height="83.46111111111111" width="110.0" x="-15.0" y="-292.9222222222222"/>
                    <y:Fill color="#F5F5F5" transparent="false"/>
                    <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
                    <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="110.0" x="0.0" y="0.0">Group 1</y:NodeLabel>
                    <y:Shape type="roundrectangle"/>
                    <y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
                    <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
                    <y:BorderInsets bottom="1" bottomF="1.0" left="0" leftF="0.0" right="0" rightF="0.0" top="1" topF="1.0001736111111086"/>
                  </y:GroupNode>
                  <y:GroupNode>
                    <y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/>
                    <y:Fill color="#F5F5F5" transparent="false"/>
                    <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
                    <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="65.201171875" x="-7.6005859375" y="0.0">Folder 1</y:NodeLabel>
                    <y:Shape type="roundrectangle"/>
                    <y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
                    <y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
                    <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
                  </y:GroupNode>
                </y:Realizers>
              </y:ProxyAutoBoundsNode>
            </data>
            <graph edgedefault="directed" id="n1::n0:">
              <node id="n1::n0::n0">
                <data key="d4"><![CDATA[CustomPropertyValue]]></data>
                <data key="d6"/>
                <data key="d7">
                  <y:ShapeNode>
                    <y:Geometry height="30.0" width="30.0" x="50.0" y="-255.4611111111111"/>
                    <y:Fill color="#FFCC00" transparent="false"/>
                    <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
                    <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">1<y:LabelModel>
                        <y:SmartNodeLabelModel distance="4.0"/>
                      </y:LabelModel>
                      <y:ModelParameter>
                        <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
                      </y:ModelParameter>
                    </y:NodeLabel>
                    <y:Shape type="rectangle"/>
                  </y:ShapeNode>
                </data>
              </node>
              <node id="n1::n0::n1">
                <data key="d4"><![CDATA[CustomPropertyValue]]></data>
                <data key="d6"/>
                <data key="d7">
                  <y:ShapeNode>
                    <y:Geometry height="30.0" width="30.0" x="0.0" y="-255.4611111111111"/>
                    <y:Fill color="#FFCC00" transparent="false"/>
                    <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
                    <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">3<y:LabelModel>
                        <y:SmartNodeLabelModel distance="4.0"/>
                      </y:LabelModel>
                      <y:ModelParameter>
                        <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
                      </y:ModelParameter>
                    </y:NodeLabel>
                    <y:Shape type="rectangle"/>
                  </y:ShapeNode>
                </data>
              </node>
            </graph>
          </node>
          <node id="n1::n1" yfiles.foldertype="group">
            <data key="d4"><![CDATA[CustomPropertyValue]]></data>
            <data key="d5"/>
            <data key="d6"/>
            <data key="d7">
              <y:ProxyAutoBoundsNode>
                <y:Realizers active="0">
                  <y:GroupNode>
                    <y:Geometry height="83.46111111111111" width="110.0" x="-15.0" y="-179.4611111111111"/>
                    <y:Fill color="#F5F5F5" transparent="false"/>
                    <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
                    <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="110.0" x="0.0" y="0.0">Group 2</y:NodeLabel>
                    <y:Shape type="roundrectangle"/>
                    <y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
                    <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/>
                    <y:BorderInsets bottom="1" bottomF="1.0" left="0" leftF="0.0" right="0" rightF="0.0" top="1" topF="1.0001736111111086"/>
                  </y:GroupNode>
                  <y:GroupNode>
                    <y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/>
                    <y:Fill color="#F5F5F5" transparent="false"/>
                    <y:BorderStyle color="#000000" type="dashed" width="1.0"/>
                    <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="21.4609375" horizontalTextPosition="center" iconTextGap="4" modelName="internal" modelPosition="t" textColor="#000000" verticalTextPosition="bottom" visible="true" width="65.201171875" x="-7.6005859375" y="0.0">Folder 2</y:NodeLabel>
                    <y:Shape type="roundrectangle"/>
                    <y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/>
                    <y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/>
                    <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/>
                  </y:GroupNode>
                </y:Realizers>
              </y:ProxyAutoBoundsNode>
            </data>
            <graph edgedefault="directed" id="n1::n1:">
              <node id="n1::n1::n0">
                <data key="d4"><![CDATA[CustomPropertyValue]]></data>
                <data key="d6"/>
                <data key="d7">
                  <y:ShapeNode>
                    <y:Geometry height="30.0" width="30.0" x="0.0" y="-142.0"/>
                    <y:Fill color="#FFCC00" transparent="false"/>
                    <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
                    <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">5<y:LabelModel>
                        <y:SmartNodeLabelModel distance="4.0"/>
                      </y:LabelModel>
                      <y:ModelParameter>
                        <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
                      </y:ModelParameter>
                    </y:NodeLabel>
                    <y:Shape type="rectangle"/>
                  </y:ShapeNode>
                </data>
              </node>
              <node id="n1::n1::n1">
                <data key="d4"><![CDATA[CustomPropertyValue]]></data>
                <data key="d6"/>
                <data key="d7">
                  <y:ShapeNode>
                    <y:Geometry height="30.0" width="30.0" x="50.0" y="-142.0"/>
                    <y:Fill color="#FFCC00" transparent="false"/>
                    <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
                    <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">6<y:LabelModel>
                        <y:SmartNodeLabelModel distance="4.0"/>
                      </y:LabelModel>
                      <y:ModelParameter>
                        <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
                      </y:ModelParameter>
                    </y:NodeLabel>
                    <y:Shape type="rectangle"/>
                  </y:ShapeNode>
                </data>
              </node>
            </graph>
          </node>
        </graph>
      </node>
      <node id="n2">
        <data key="d4"><![CDATA[CustomPropertyValue]]></data>
        <data key="d6"/>
        <data key="d7">
          <y:ShapeNode>
            <y:Geometry height="30.0" width="30.0" x="125.0" y="-142.0"/>
            <y:Fill color="#FFCC00" transparent="false"/>
            <y:BorderStyle color="#000000" raised="false" type="line" width="1.0"/>
            <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="17.96875" horizontalTextPosition="center" iconTextGap="4" modelName="custom" textColor="#000000" verticalTextPosition="bottom" visible="true" width="11.634765625" x="9.1826171875" y="6.015625">9<y:LabelModel>
                <y:SmartNodeLabelModel distance="4.0"/>
              </y:LabelModel>
              <y:ModelParameter>
                <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/>
              </y:ModelParameter>
            </y:NodeLabel>
            <y:Shape type="rectangle"/>
          </y:ShapeNode>
        </data>
      </node>
      <edge id="n1::n1::e0" source="n1::n1::n0" target="n1::n1::n1">
        <data key="d10"/>
        <data key="d11">
          <y:PolyLineEdge>
            <y:Path sx="15.0" sy="-0.0" tx="-15.0" ty="-0.0"/>
            <y:LineStyle color="#000000" type="line" width="1.0"/>
            <y:Arrows source="none" target="standard"/>
            <y:BendStyle smoothed="false"/>
          </y:PolyLineEdge>
        </data>
      </edge>
      <edge id="n1::n0::e0" source="n1::n0::n1" target="n1::n0::n0">
        <data key="d10"/>
        <data key="d11">
          <y:PolyLineEdge>
            <y:Path sx="15.0" sy="-0.0" tx="-15.0" ty="-0.0"/>
            <y:LineStyle color="#000000" type="line" width="1.0"/>
            <y:Arrows source="none" target="standard"/>
            <y:BendStyle smoothed="false"/>
          </y:PolyLineEdge>
        </data>
      </edge>
      <edge id="e0" source="n1::n0::n0" target="n0">
        <data key="d10"/>
        <data key="d11">
          <y:PolyLineEdge>
            <y:Path sx="15.0" sy="-0.0" tx="-15.0" ty="-0.0"/>
            <y:LineStyle color="#000000" type="line" width="1.0"/>
            <y:Arrows source="none" target="standard"/>
            <y:BendStyle smoothed="false"/>
          </y:PolyLineEdge>
        </data>
      </edge>
      <edge id="e1" source="n1::n1::n1" target="n2">
        <data key="d10"/>
        <data key="d11">
          <y:PolyLineEdge>
            <y:Path sx="15.0" sy="-0.0" tx="-15.0" ty="-0.0"/>
            <y:LineStyle color="#000000" type="line" width="1.0"/>
            <y:Arrows source="none" target="standard"/>
            <y:BendStyle smoothed="false"/>
          </y:PolyLineEdge>
        </data>
      </edge>
    </graph>
    <data key="d8">
      <y:Resources/>
    </data>
  </graphml>
  """
      # verify that nodes / attributes are correctly read when part of a group
      fh = io.BytesIO(data.encode("UTF-8"))
      G = nx.read_graphml(fh)
      data = [x for _, x in G.nodes(data=True)]
      assert len(data) == 9
      for node_data in data:
          assert node_data["CustomProperty"] != ""
  
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 17 for calling the TestReadGraphML obj's underlying member method code with example usage: obj.test_read_attributes_with_groups() without return types