code: def nrrd_2_numpy(input_nrrd, return_all=False):
      """Loads nrrd data and optionally return a nrrd header
      in pynrrd's format. If array is 4D, swaps axes so
      that time dimension is last to match nifti standard.
      """
  
      nrrd_data, nrrd_options = nrrd.read(input_nrrd)
  
      if nrrd_data.ndim == 4:
          nrrd_data = np.rollaxis(nrrd_data, 0, 4)
  
      if return_all:
          return (
              nrrd_data,
              nrrd_options,
              None,
          )  # Affine not implemented yet..
      else:
          return nrrd_data
  
imports: import os
  import numpy
  import nibabel
  import nrrd
  import pydicom
  import subprocess
  from collections import defaultdict
  from imageio import imwrite, imread
  from deepneuro.utilities.util import grab_files_recursive, quotes
label_desc: Use image node_id 9 for calling a global function with example usage: nrrd_2_numpy(input_nrrd, return_all) and returns: nrrd_data,  nrrd_options,  None, nrrd_data