Decorator to mark a specified function as deprecated

    :param version: version in which it is deprecated
    :param replacement: replacement functions to use

def deprecated(version, *replacement):
    """ Decorator to mark a specified function as deprecated

    :param version: version in which it is deprecated
    :param replacement: replacement functions to use
    """

    def deprecated_wrapper(func):
        replacement_message = 'Use {} instead'.format(', '.join(
            ["'{}'".format(_get_func_fq_name(x))
             for x in replacement]))
        log_message = ("'{}' is deprecated, {}"
                       "".format(_get_func_fq_name(func), replacement_message))
        # func.__doc__ = replacement[0].__doc__

        func_path = _get_func_path(func)
        doc_replacement = []
        for x in replacement:
            if func_path == _get_func_path(x):
                doc_replacement.append(':func:`{}`'.format(_func_name(x)))
            else:
                doc_replacement.append(
                    ':func:`{}`'.format(_get_func_fq_name(x)))

        func.__doc__ = """
            .. deprecated:: {}
               Use {} instead
               
               {} 
            """.format(version,
                       ', '.join(doc_replacement),
                       func.__doc__ if func.__doc__ else '')

        @wraps(func)
        def wrapper(*args, **kwargs):
            log.warning(log_message)
            return func(*args, **kwargs)

        return wrapper

    return deprecated_wrapper