use ANY for train_fn and predict_fn types for now--too much of a headache otherwise