code: def __ensure_suffix_stem(t, suffix):
      
      tpath = str(t)
      if not tpath.endswith(suffix):
          stem = tpath
          tpath += suffix
          
          return tpath, stem
      else:
          stem, ext = os.path.splitext(tpath)
      
      return t, stem
docs: Ensure that the target t has the given suffix, and return the file's stem.