def METHOD_NAME(self, data):
    if self.model.__class__.__name__ == 'OfaForAllTasks':
        return batch_process(self.model, data)
    else:
        return super(TextClassificationPipeline, self).METHOD_NAME(data)