code: def change_dir(request):
      orig_dir = os.getcwd()
      filepath = os.path.dirname(os.path.realpath(__file__))
      datadir = os.path.realpath(
          os.path.join(filepath, "../../../testing/data")
      )
      os.chdir(datadir)
  
      def move2orig():
          os.chdir(orig_dir)
  
      request.addfinalizer(move2orig)
  
file_path: nipype/nipype/interfaces/ants/tests/test_segmentation.py
imports: from ..segmentation import LaplacianThickness
  from .test_resampling import change_dir
  import os
  import pytest
label_desc: Use image node_id 1 for calling a global function with example usage: change_dir(request) without return types