code: def in_directory(path):
      
      curdir = os.path.abspath(os.curdir)
      os.chdir(path)
      yield
      os.chdir(curdir)
docs: Context manager (with statement) that changes the current directory
      during the context.