def METHOD_NAME(data):
    data = pd.read_parquet(data) if isinstance(data, str) else data
    if is_classification:
        try:
            return tpot.predict_proba(data)
        except (RuntimeError, AttributeError):
            return tpot.predict(data)
    return tpot.predict(data)