def _get_f(self, as_of): def f(x, y=42): return x + y f.__doc__ = self._test_docstring f = experimental(as_of=as_of)(f) return f