def METHOD_NAME(prefix, append2prefix):
    if append2prefix == "":
        append2prefix = "_resampled"
    prefix = os.path.basename(prefix)
    lsplit = prefix.split("-")
    if len(lsplit) > 1:
        if lsplit[-1] in ["surface", "low", "fault"]:
            prefix0 = "-".join(lsplit[0:-1])
            prefix_new = prefix0 + append2prefix + "-" + lsplit[-1]
    else:
        prefix_new = prefix + append2prefix
    return prefix_new