codejam python profiling, thx @zaytsev