code: def test_split_flow():
      with TemporaryDirectory() as out_dir:
          split_flow = SplitFlow()
          data_path, _, _ = get_fnames()
          volume, affine = load_nifti(data_path)
          split_flow.run(data_path, out_dir=out_dir)
          assert_true(
              os.path.isfile(
                  split_flow.last_generated_outputs["out_split"]
              )
          )
          split_flow._force_overwrite = True
          split_flow.run(data_path, vol_idx=0, out_dir=out_dir)
          split_path = split_flow.last_generated_outputs["out_split"]
          assert_true(os.path.isfile(split_path))
          split_data, split_affine = load_nifti(split_path)
          npt.assert_equal(split_data.shape, volume[..., 0].shape)
          npt.assert_array_almost_equal(split_affine, affine)
  
file_path: dipy/dipy/workflows/tests/test_io.py
imports: import logging
  import os
  from tempfile import mkstemp, TemporaryDirectory
  import numpy
  import numpy.testing
  from dipy.data import get_fnames
  from dipy.data.fetcher import dipy_home
  from dipy.io.image import load_nifti, save_nifti
  from dipy.io.streamline import load_tractogram
  from dipy.testing import assert_true
  from dipy.reconst.shm import convert_sh_descoteaux_tournier
  from dipy.workflows.io import IoInfoFlow, FetchFlow, SplitFlow, ConcatenateTractogramFlow, ConvertSHFlow, ConvertTractogramFlow
label_desc: Use image node_id 4 for calling a global function with example usage: test_split_flow() without return types