code: def nifti_splitext(input_filepath):
      """os.path.splitext splits a filename into the part before the LAST
      period and the part after the LAST period. This will screw one up
      if working with, say, .nii.gz files, which should be split at the
      FIRST period. This function performs an alternate version of splitext
      which does just that.
  
      TODO: Make work if someone includes a period in a folder name (ugh).
  
      Parameters
      ----------
      input_filepath: str
          The filepath to split.
  
      Returns
      -------
      split_filepath: list of str
          A two-item list, split at the first period in the filepath.
  
      """
  
      input_filepath = str(input_filepath)
      path_split = str.split(input_filepath, os.sep)
      basename = path_split[-1]
      split_filepath = str.split(basename, ".")
  
      if len(split_filepath) <= 1:
          return split_filepath
      else:
          return [
              os.path.join(
                  os.sep.join(path_split[0:-1]), split_filepath[0]
              ),
              "." + ".".join(split_filepath[1:]),
          ]
  
file_path: DeepNeuro/deepneuro/utilities/util.py
imports: import glob
  import math
  import numpy
  import os
  import fnmatch
  import sys
label_desc: Use image node_id 6 for calling a global function with example usage: nifti_splitext(input_filepath) and returns: split_filepath, list