code: def basename_without_extension(fname):
      base = os.path.basename(fname)
      result = base.split(".")[0]
      if result[-4:] == ".nii":
          result = result.split(".")[0]
  
      return result
  
imports: import inspect
  import itertools
  import numpy
  import os
  from glob import glob
  from dipy.workflows.base import get_args_default
label_desc: Use image node_id 5 for calling a global function with example usage: basename_without_extension(fname) and returns: result