def gc_helper(node_list):
 last_user = {}
 computed = set()
 for node in node_list:
  for input in node.inputs:
   last_user[input] = node
  for output in node.outputs:
   computed.add(output)
 return (computed, last_user)

def gc_helper ( node_list ) : last_user = { } computed = set ( ) for node in node_list : for input in node . inputs : last_user [ input ] = node for output in node . outputs : computed . add ( output ) return ( computed , last_user )
return the set of variable instances which are computed by node_list .