code: def test_surfxfm(create_surf_file_in_directory):
      xfm = fs.SurfaceTransform()
  
      # Test underlying command
      assert xfm.cmd == "mri_surf2surf"
  
      # Test mandatory args exception
      with pytest.raises(ValueError):
          xfm.run()
  
      # Create testing files
      surf, cwd = create_surf_file_in_directory
  
      # Test input settings
      xfm.inputs.source_file = surf
      xfm.inputs.source_subject = "my_subject"
      xfm.inputs.target_subject = "fsaverage"
      xfm.inputs.hemi = "lh"
  
      # Test the command line
      assert xfm.cmdline == (
          "mri_surf2surf --hemi lh --tval %s/lh.a.fsaverage.nii --sval %s --srcsubject my_subject --trgsubject fsaverage"
          % (cwd, surf)
      )
  
      # Test identity
      xfmish = fs.SurfaceTransform(
          source_subject="fsaverage",
          target_subject="my_subject",
          source_file=surf,
          hemi="lh",
      )
      assert xfm != xfmish
  
file_path: nipype/nipype/interfaces/freesurfer/tests/test_utils.py
imports: import os
  import os.path
  import pytest
  from nipype.testing.fixtures import create_files_in_directory_plus_dummy_file, create_surf_file_in_directory
  from nipype.pipeline import engine
  from nipype.interfaces import freesurfer
  from nipype.interfaces.base import TraitError
  from nipype.interfaces.io import FreeSurferSource
label_desc: Use image node_id 3 for calling a global function with example usage: test_surfxfm(create_surf_file_in_directory) without return types