Rewritten horrible discovery.py.
<?xml version="1.0"?>
<!DOCTYPE PyObject SYSTEM "PyObjects.dtd">
<PyObject module="node" class="Node" id="157308236">
<attr name="Profile" type="dict" id="157312244" >
</attr>
<attr name="Description" type="string" value="" />
<attr name="Dictionary" type="dict" id="157311972" >
<entry>
<key type="numeric" value="4096" />
<val type="numeric" value="0" />
</entry>
<entry>
<key type="numeric" value="4097" />
<val type="numeric" value="0" />
</entry>
<entry>
<key type="numeric" value="5122" />
<val type="list" id="155073324" >
<item type="string" value="{True:"$NODEID+0x%X00"%(base+2),False:0x80000000}[base<4]" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="5123" />
<val type="list" id="155064684" >
<item type="string" value="{True:"$NODEID+0x%X00"%(base+2),False:0x80000000}[base<4]" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="8192" />
<val type="numeric" value="0" />
</entry>
<entry>
<key type="numeric" value="8193" />
<val type="numeric" value="0" />
</entry>
<entry>
<key type="numeric" value="5634" />
<val type="list" id="155071340" >
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="5635" />
<val type="list" id="155052268" >
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="6146" />
<val type="list" id="155071116" >
<item type="string" value="{True:"$NODEID+0x%X80"%(base+1),False:0x80000000}[base<4]" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="6658" />
<val type="list" id="155226444" >
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="6147" />
<val type="list" id="155063820" >
<item type="string" value="{True:"$NODEID+0x%X80"%(base+1),False:0x80000000}[base<4]" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="4608" />
<val type="list" id="155053836" >
<item type="string" value=""$NODEID+0x600"" />
<item type="string" value=""$NODEID+0x580"" />
</val>
</entry>
<entry>
<key type="numeric" value="4120" />
<val type="list" id="155065132" >
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="5120" />
<val type="list" id="152878604" >
<item type="string" value="{True:"$NODEID+0x%X00"%(base+2),False:0x80000000}[base<4]" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="6659" />
<val type="list" id="155064940" >
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="5632" />
<val type="list" id="155065196" >
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="5121" />
<val type="list" id="152878124" >
<item type="string" value="{True:"$NODEID+0x%X00"%(base+2),False:0x80000000}[base<4]" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="6144" />
<val type="list" id="152878060" >
<item type="string" value="{True:"$NODEID+0x%X80"%(base+1),False:0x80000000}[base<4]" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="5633" />
<val type="list" id="155072332" >
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="6656" />
<val type="list" id="155051788" >
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="6145" />
<val type="list" id="144466700" >
<item type="string" value="{True:"$NODEID+0x%X80"%(base+1),False:0x80000000}[base<4]" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
<entry>
<key type="numeric" value="6657" />
<val type="list" id="155053772" >
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
<item type="numeric" value="0" />
</val>
</entry>
</attr>
<attr name="SpecificMenu" type="list" id="157308300" >
</attr>
<attr name="ParamsDictionary" type="dict" id="152844732" >
</attr>
<attr name="UserMapping" type="dict" id="155085108" >
<entry>
<key type="numeric" value="8192" />
<val type="dict" id="155060804" >
<entry>
<key type="string" value="need" />
<val type="False" value="" />
</entry>
<entry>
<key type="string" value="values" />
<val type="list" id="155052140" >
<item type="dict" id="152845684" >
<entry>
<key type="string" value="access" />
<val type="string" value="rw" />
</entry>
<entry>
<key type="string" value="pdo" />
<val type="True" value="" />
</entry>
<entry>
<key type="string" value="type" />
<val type="numeric" value="3" />
</entry>
<entry>
<key type="string" value="name" />
<val type="string">OutVar</val>
</entry>
</item>
</val>
</entry>
<entry>
<key type="string" value="name" />
<val type="string">OutVar</val>
</entry>
<entry>
<key type="string" value="struct" />
<val type="numeric" value="1" />
</entry>
</val>
</entry>
<entry>
<key type="numeric" value="8193" />
<val type="dict" id="155059852" >
<entry>
<key type="string" value="need" />
<val type="False" value="" />
</entry>
<entry>
<key type="string" value="values" />
<val type="list" id="155051180" >
<item type="dict" id="152782612" >
<entry>
<key type="string" value="access" />
<val type="string" value="rw" />
</entry>
<entry>
<key type="string" value="pdo" />
<val type="True" value="" />
</entry>
<entry>
<key type="string" value="type" />
<val type="numeric" value="3" />
</entry>
<entry>
<key type="string" value="name" />
<val type="string">InVar</val>
</entry>
</item>
</val>
</entry>
<entry>
<key type="string" value="name" />
<val type="string">InVar</val>
</entry>
<entry>
<key type="string" value="struct" />
<val type="numeric" value="1" />
</entry>
</val>
</entry>
</attr>
<attr name="DS302" type="dict" id="152843236" >
</attr>
<attr name="ProfileName" type="string" value="None" />
<attr name="Type" type="string" value="slave" />
<attr name="ID" type="numeric" value="0" />
<attr name="Name" type="string" value="SlaveNode" />
</PyObject>