code: def start_watching_memory():
      """Register memory profiling tools to IPython instance."""
      global watching_memory
      watching_memory = True
      ip = get_ipython()
      ip.events.register("post_run_cell", watch_memory)
      ip.events.register("pre_run_cell", pre_run_cell)
  
file_path: recommenders/recommenders/utils/notebook_memory_management.py
imports: from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import unicode_literals
  import time
  import memory_profiler
  from IPython import get_ipython
  import psutil
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: start_watching_memory() without return types