def wrap_fn(newname: str, doc: str):
    """
    Decorator which renames a function.
    
    Parameters
    ----------
    newname: str
        Name of the new function.
    doc: str
        Docstring of the new function.
    """
    def decorator(f):
        f.__name__ = newname
        f.__doc__ = doc
        return f
    return decorator