<s> from __future__ import division <EOL> from vistrails . core . cache . hasher import Hasher <EOL> def vtk_hasher ( pipeline , module , chm ) : <EOL> outgoing_connections = pipeline . graph . edges_from ( module . id ) <EOL> incoming_connections = pipeline . graph . edges_to ( module . id ) <EOL> current_hash = Hasher . module_signature ( module , chm ) <EOL> chashes = [ Hasher . connection_signature ( pipeline . connections [ c_id ] ) <EOL> for ( _ , c_id ) in outgoing_connections ] <EOL> chashes += [ Hasher . connection_signature ( pipeline . connections [ c_id ] ) <EOL> for ( _ , c_id ) in incoming_connections ] <EOL> compound_hash = Hasher . compound_signature ( chashes ) <EOL> return Hasher . compound_signature ( [ current_hash , compound_hash ] ) </s>
