def METHOD_NAME(cls, name, f, wrap):
    if wrap:
        def f_wrapped(ctx, *args, **kwargs):
            convert = ctx.convert
            args = [convert(a) for a in args]
            return f(ctx, *args, **kwargs)
    else:
        f_wrapped = f
    f_wrapped.__doc__ = function_docs.__dict__.get(name, f.__doc__)
    setattr(cls, name, f_wrapped)