def test_data_types(est: BaseEstimator, feature, target): if hasattr(est, 'fit'): # Meaning a Handler or Robust Model est.fit(feature, target).predict(feature) elif hasattr(est, 'detect'): est.detect(feature, target) elif hasattr(est, 'simulate_noise'): est.simulate_noise(feature, target) else: raise Exception("WTF")