code: def deprecated(new_name: str):
      
      def decorator(func):
          @wraps(func)
          def new_func(*args, **kwargs):
              warnings.simplefilter('always', DeprecationWarning)  # turn off filter
              warnings.warn(
                  'Use {0} instead of {1}, {1} will be removed in the future.'
                  .format(new_name, func.__name__),
                  category=DeprecationWarning,
                  stacklevel=2,
              )
              warnings.simplefilter('default', DeprecationWarning)  # reset filter
              return func(*args, **kwargs)
          setattr(new_func, '__deprecated', True)
          return new_func
      return decorator
docs: This is a decorator which can be used to mark functions
      as deprecated. It will result in a warning being emitted
      when the function is used.