SimRank algorithm implementation in Python