code: def sharing_mode():
      """
      Context manager to tell models that pickling will be used for cross-process
      sharing, not model persistence.
      """
      old = _save_mode()
      _store_state.mode = "share"
      try:
          yield
      finally:
          _store_state.mode = old
  
file_path: lkpy/lenskit/sharing/__init__.py
imports: import os
  import warnings
  from abc import abstractmethod, ABC
  from contextlib import contextmanager
  import threading
  import logging
  from .binpickle import persist_binpickle, BPKPersisted
  from .shm import persist_shm, SHMPersisted, SHM_AVAILABLE
label_desc: Use image node_id 2 for calling a global function with example usage: sharing_mode() without return types