<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def value( self, node, parent=None ):
 """Return value used to compare size of this node"""

        # this is the *weighted* size/contribution of the node 
        try:
            return node['contribution']
        except KeyError, err:
            contribution = int(node.get('totsize',0)/float( len(node.get('parents',())) or 1))
            node['contribution'] = contribution
            return contribution