code: def setup_file(request, tmpdir_factory):
      tmp_dir = tmpdir_factory.mktemp("files")
      tmp_infile = tmp_dir.join("foo.txt")
      with tmp_infile.open("w") as fp:
          fp.writelines(["123456789"])
  
      tmp_dir.chdir()
  
      return tmp_infile.strpath
  
imports: import os
  import warnings
  import pytest
  from ....utils.filemanip import split_filename
  from ...None import base
  from ...base import traits, Undefined
  from ....interfaces import fsl
  from ...utility.wrappers import Function
  from ....pipeline import Node
  from ..specs import get_filecopy_info
label_desc: Use image node_id 1 for calling a global function with example usage: setup_file(request, tmpdir_factory) and returns: tmp_infile