code: def in_tmp_path():
      with tempfile.TemporaryDirectory() as newpath:
          old_cwd = os.getcwd()
          os.chdir(newpath)
          yield Path(newpath)
          os.chdir(old_cwd)
  
file_path: nipy/nipy/conftest.py
imports: import os
  import tempfile
  from pathlib import Path
  import numpy
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: in_tmp_path() without return types