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)
  
file_path: catboost/contrib/python/prompt-toolkit/py2/tests/test_contrib.py
imports: from __future__ import unicode_literals, absolute_import, print_function
  import os
  import shutil
  import tempfile
  from contextlib import contextmanager
  from six import text_type
  from prompt_toolkit.completion import CompleteEvent
  from prompt_toolkit.document import Document
  from prompt_toolkit.contrib.completers.filesystem import PathCompleter
label_desc: Use image node_id 1 for calling a global function with example usage: chdir(directory) without return types