Add a deprecation warning for a function in docs