code: def deprecated(message=None):
      
  
      def decorated_method_to_deprecate(func):
          if inspect.isclass(func):
              # Handle a deprecated class differently from a deprecated method
              msg = "Class {}() is DEPRECATED! *** ".format(func.__name__)
              if message:
                  msg += "<> %s <>" % message
              warnings.simplefilter('always', DeprecationWarning)  # See Warnings
              warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
              warnings.simplefilter('default', DeprecationWarning)  # Set Default
              return func
  
          @wraps(func)
          def new_func(*args, **kwargs):
              msg = "Method {}() is DEPRECATED! *** ".format(func.__name__)
              if message:
                  msg += "<> %s <>" % message
              warnings.simplefilter('always', DeprecationWarning)  # See Warnings
              warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
              warnings.simplefilter('default', DeprecationWarning)  # Set Default
              return func(*args, **kwargs)
          return new_func
      return decorated_method_to_deprecate
docs: This decorator marks methods as deprecated.
          A warning is displayed if the method is called.