code: def create_surf_file_in_directory(request, tmpdir):
      cwd = tmpdir.chdir()
      surf = "lh.a.nii"
      nifti_image_files(
          tmpdir.strpath, filelist=surf, shape=(1, 100, 1)
      )
  
      def change_directory():
          cwd.chdir()
  
      request.addfinalizer(change_directory)
      return (surf, tmpdir.strpath)
  
file_path: nipype/nipype/testing/fixtures.py
imports: import os
  import pytest
  import numpy
  import nibabel
  from nipype.utils.filemanip import ensure_list
  from nipype.interfaces.fsl import Info
  from nipype.interfaces.fsl.base import FSLCommand
label_desc: Use image node_id 6 for calling a global function with example usage: create_surf_file_in_directory(request, tmpdir) and returns: surf,  tmpdir