added python memory usage code