SOURCE CODE: Mid-Level API

From what I can gather f(file_name) is the same a label_func(file_name.name), so that’s what is happening I guess, creating a function that gets the name attribute of the file path and labe_func is applied to it.

1 Like