def preserveName(f):
    """
    Preserve the name of the given function on the decorated function.
    """
    def decorator(decorated):
        return copyfunction(decorated,
                            dict(name=f.__name__), dict(name=f.__name__))
    return decorator

    Preserve the name of the given function on the decorated function.
    
stackoverflow/venv/lib/python3.6/site-packages/automat/_introspection.py