code: def authentication_required(meth):
      
  
      def check(cls, *args, **kwargs):
          if cls.authenticated:
              return meth(cls, *args, **kwargs)
          raise Error("Authentication required")
  
      return check
docs: Simple class method decorator.
  
      Checks if the client is currently connected.
  
      :param meth: the original called method