def FunctionWrapper(f):
    """Set name attribute."""
    if not f.__doc__:
        raise ValueError('Function %s must have doc string.' % f.__name__)
    f.name = f.__name__.rstrip('_')
    return f
