def inherit_docstring_from(cls):
    def _doc(func):
        cls_docstring = getattr(cls, func.__name__).__doc__
        func_docstring = func.__doc__
        if func_docstring is None:
            func.__doc__ = cls_docstring
        else:
            new_docstring = func_docstring % dict(super=cls_docstring)
            func.__doc__ = new_docstring
        return func
    return _doc
This decorator modifies the decorated function's docstring by
dataset/ETHPy150Open scipy/scipy/scipy/misc/doccer.py/inherit_docstring_from