Hi,
As far as I know based on model’s I have implemented or source codes I have read in github ,etc, developers usually use their preprocessing step using custom defined class and in __getitem__ method.
Actually, I have implemented 2 different classes for different tasks, one using Native python and other using third-party libraries and both works fine.
So I go for the second method.