Labels_from_function for multiclass classification using data block api

I have a dataset which is a multiclass classification problem and the file names are shown below.
[PosixPath(’/root/.fastai/data/NewVowel/train/V5_C0_78.png’),
PosixPath(’/root/.fastai/data/NewVowel/train/V4_C9_28.png’)]

I want to label the output as “V5 C0” using the custom function.
Can someone help me how should i approach in order to achieve the correct output labels.