def f_append_before_ext(fpath, suffix):
    """
    Append a suffix to file name and retain its extension
    """
    name, ext = f_ext(fpath)
    return name + suffix + ext

    Append a suffix to file name and retain its extension
    
surreal/utils/filesys.py