Use functools.wraps so that Sphinx automethod can get decorated docstrings.