def HashEntity(entity):
 return hashlib.sha1(entity.Encode()).digest()

def HashEntity ( entity ) : return hashlib . sha1 ( entity . Encode ( ) ) . digest ( )
return a very-likely-unique hash of an entity .