def tracemalloc_toggle(self) -> None:
        """Toggle tracemalloc status

        Running tracemalloc is required for `qtile top`
        """
        import tracemalloc

        if not tracemalloc.is_tracing():
            tracemalloc.start()
        else:
            tracemalloc.stop()
Toggle tracemalloc status

        Running tracemalloc is required for `qtile top`
        
libqtile/core/manager.py