code: def io_scope(path, replace_current_scopes=False):
      current_scope = current_io_scopes()
      before = copy(current_scope)
      if replace_current_scopes:
          set_io_scopes(path if isinstance(path, list) else [path])
      else:
          current_scope.append(path)
      try:
          yield
      finally:
          set_io_scopes(before)
  
file_path: lucid/lucid/misc/io/scoping.py
imports: import os
  from copy import copy
  import threading
  import sys
  from contextlib import contextmanager
label_desc: Use image node_id 3 for calling a global function with example usage: io_scope(path, replace_current_scopes) without return types