code: def _decorate_fun(self, fun):
          
  
          msg = "Function %s is deprecated" % fun.__name__
          if self.extra:
              msg += "; %s" % self.extra
  
          def wrapped(*args, **kwargs):
              warnings.warn(msg, category=DeprecationWarning)
              return fun(*args, **kwargs)
  
          wrapped.__name__ = fun.__name__
          wrapped.__dict__ = fun.__dict__
          wrapped.__doc__ = self._update_doc(fun.__doc__)
  
          return wrapped
docs: Decorate function fun