code: def test_newsegment():
      if spm.Info.name() == "SPM12":
          assert spm.NewSegment()._jobtype == "spatial"
          assert spm.NewSegment()._jobname == "preproc"
      else:
          assert spm.NewSegment()._jobtype == "tools"
          assert spm.NewSegment()._jobname == "preproc8"
  
imports: import os
  import pytest
  from nipype.testing.fixtures import create_files_in_directory
  import nipype.interfaces.spm
  from nipype.interfaces.spm import no_spm
  import nipype.interfaces.matlab
label_desc: Use image node_id 12 for calling a global function with example usage: test_newsegment() without return types