def deprecated(message=None):
    """Decorator to mark functions as deprecated. A warning will be emitted when the function is used."""
    def deco(func):
        @functools.wraps(func)
        def wrapped(*args, **kwargs):
            warnings.warn(
                message or 'Call to deprecated function {}'.format(func.__name__),
                category=PubChemPyDeprecationWarning,
                stacklevel=2
            )
            return func(*args, **kwargs)
        return wrapped
    return deco
Decorator to mark functions as deprecated. A warning will be emitted when the function is used.