docstr: Splits the input 4D file and extracts the required 3D volume.
  
  Parameters
  ----------
  input_files : variable string
      Any number of Nifti1 files
  vol_idx : int, optional
  out_dir : string, optional
      Output directory. (default current directory)
  out_split : string, optional
      Name of the resulting split volume
docstr_tok: ["Splits","the","input","4D","file","and","extracts","the","required","3D","volume",".","Parameters","--","--","--","--","--","input_files",":","variable","string","Any","number","of","Nifti1","files","vol_idx",":","int",",","optional","out_dir",":","string",",","optional","Output","directory",".","(","default","current","directory",")","out_split",":","string",",","optional","Name","of","the","resulting","split","volume"]
code: def run(
      self, input_files, vol_idx=0, out_dir="", out_split="split.nii.gz"
  ):
      """Splits the input 4D file and extracts the required 3D volume.
  
      Parameters
      ----------
      input_files : variable string
          Any number of Nifti1 files
      vol_idx : int, optional
      out_dir : string, optional
          Output directory. (default current directory)
      out_split : string, optional
          Name of the resulting split volume
  
      """
      io_it = self.get_io_iterator()
      for fpath, osplit in io_it:
          logging.info("Splitting {0}".format(fpath))
          data, affine, image = load_nifti(fpath, return_img=True)
  
          if vol_idx == 0:
              logging.info("Splitting and extracting 1st b0")
  
          split_vol = data[..., vol_idx]
          save_nifti(osplit, split_vol, affine, image.header)
  
          logging.info("Split volume saved as {0}".format(osplit))
  
imports: import importlib
  import os
  import sys
  import logging
  from inspect import getmembers, isfunction
  import warnings
  import trx.trx_file_memmap
  import numpy
  from dipy.io.image import load_nifti, save_nifti
  from dipy.io.streamline import load_tractogram, save_tractogram
  from dipy.reconst.shm import convert_sh_descoteaux_tournier
  from dipy.tracking.streamlinespeed import length
  from dipy.utils.tractogram import concatenate_tractogram
  from dipy.workflows.workflow import Workflow
label_desc: Use image node_id 2 for calling the SplitFlow obj's underlying member method code with example usage: obj.run(input_files, vol_idx, out_dir, out_split) without return types