I am attempting to use the memory_profiler package. Example code below:
memory_profiler
from memory_profiler import memory_usage from time import sleep def f():