code: def test_fitmsparams(create_files_in_directory):
      filelist, outdir = create_files_in_directory
  
      fit = freesurfer.FitMSParams()
  
      # make sure command gets called
      assert fit.cmd == "mri_ms_fitparms"
  
      # test raising error with mandatory args absent
      with pytest.raises(ValueError):
          fit.run()
  
      # .inputs based parameters setting
      fit.inputs.in_files = filelist
      fit.inputs.out_dir = outdir
      assert fit.cmdline == "mri_ms_fitparms  {} {} {}".format(
          filelist[0],
          filelist[1],
          outdir,
      )
  
      # constructor based parameter setting
      fit2 = freesurfer.FitMSParams(
          in_files=filelist,
          te_list=[1.5, 3.5],
          flip_list=[20, 30],
          out_dir=outdir,
      )
      assert fit2.cmdline == (
          "mri_ms_fitparms  -te %.3f -fa %.1f %s -te %.3f -fa %.1f %s %s"
          % (1.500, 20.0, filelist[0], 3.500, 30.0, filelist[1], outdir)
      )
  
file_path: nipype/nipype/interfaces/freesurfer/tests/test_preprocess.py
imports: import os
  import pytest
  from looseversion import LooseVersion
  from nipype.testing.fixtures import create_files_in_directory
  from nipype.interfaces import freesurfer
  from nipype.interfaces.freesurfer import Info
label_desc: Use image node_id 2 for calling a global function with example usage: test_fitmsparams(create_files_in_directory) without return types