I want to profile time and memory usage of class method. I didn’t find an out of box solution for this (are there such modules?), and I decided to use timeit for time profiling and memory_usage from memory_profiler module. I faced a problem of profiling methods with memory_profiler. I’ve tried different variants, and none of them worked. When I try