code: def test_plottimeseries(create_files_in_directory_plus_output_type):
      filelist, outdir, _ = create_files_in_directory_plus_output_type
      parfiles = create_parfiles()
      plotter = fsl.PlotTimeSeries()
  
      # make sure command gets called
      assert plotter.cmd == "fsl_tsplot"
  
      # test raising error with mandatory args absent
      with pytest.raises(ValueError):
          plotter.run()
  
      # .inputs based parameters setting
      plotter.inputs.in_file = parfiles[0]
      plotter.inputs.labels = ["x", "y", "z"]
      plotter.inputs.y_range = (0, 1)
      plotter.inputs.title = "test plot"
      plotter.inputs.out_file = "foo.png"
      assert plotter.cmdline == (
          "fsl_tsplot -i %s -a x,y,z -o foo.png -t 'test plot' -u 1 --ymin=0 --ymax=1"
          % parfiles[0]
      )
  
      # .run based parameter setting
      plotter2 = fsl.PlotTimeSeries(
          in_file=parfiles,
          title="test2 plot",
          plot_range=(2, 5),
          out_file="bar.png",
      )
      assert (
          plotter2.cmdline
          == "fsl_tsplot -i %s,%s -o bar.png --start=2 --finish=5 -t 'test2 plot' -u 1"
          % tuple(parfiles)
      )
  
file_path: nipype/nipype/interfaces/fsl/tests/test_utils.py
imports: import os
  import numpy
  import nibabel
  import pytest
  import nipype.interfaces.fsl.utils
  from nipype.interfaces.fsl import no_fsl, Info
  from nipype.testing.fixtures import create_files_in_directory_plus_output_type
label_desc: Use image node_id 7 for calling a global function with example usage: test_plottimeseries(create_files_in_directory_plus_output_type) without return types