<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def default_classify_function(data):
 """ A default classify_function which recieve `data` and return filename without characters just after the last underscore './foo/foo_bar.piyo' './foo/foo.piyo' './foo/foo.piyo' './foo/foo' """

    # data[0] indicate the filename of the data
    rootname, basename = os.path.split(data[0])
    filename, ext = os.path.splitext(basename)
    if '_' in filename:
        filename = filename.rsplit('_', 1)[0]
    filename = os.path.join(rootname, filename + ext)
    return filename