I'd like to know what I can use to validate a function, not allowing it to be used if it's to_pandas, in python language.