code: def chdir(directory):
      """Context manager for current working directory temporary change."""
      orig_dir = os.getcwd()
      os.chdir(directory)
  
      try:
          yield
      finally:
          os.chdir(orig_dir)
  
imports: from __future__ import annotations
  import os
  import re
  import shutil
  import tempfile
  from contextlib import contextmanager
  from prompt_toolkit.completion import CompleteEvent, FuzzyWordCompleter, NestedCompleter, PathCompleter, WordCompleter, merge_completers
  from prompt_toolkit.document import Document
label_desc: Use image node_id 1 for calling a global function with example usage: chdir(directory) without return types