base.py: add functools.wraps to decorator to make func_name/__doc__ work