Monitor Memory usage of Python code