I am using the tracemalloc library to pinpoint memory concerns in my application.
This is the code that I am using.