code: def nope_scope(
      options=NSActivityUserInitiatedAllowingIdleSystemSleep,
      reason="Because Reasons",
  ):
      """context manager for beginActivityWithOptions.
  
      Within this context, App Nap will be disabled.
      """
      activity = beginActivityWithOptions(options, reason)
      try:
          yield
      finally:
          endActivity(activity)
  
file_path: catboost/contrib/python/appnope/py3/appnope/_nope.py
imports: from contextlib import contextmanager
  import ctypes
  import ctypes.util
label_desc: Use image node_id 9 for calling a global function with example usage: nope_scope(options, reason) without return types