code: def change_working_directory(directory=None):
      """Change working directory in execution context if provided."""
      if directory:
          try:
              saved_directory = os.getcwd()
              logger.info(f"Changing to shadow directory: {directory}")
              os.chdir(directory)
              yield
          finally:
              os.chdir(saved_directory)
      else:
          yield
  
label_desc: Use image node_id 1 for calling a global function with example usage: change_working_directory(directory) without return types