code: def no_history_check(func):
      
  
      def no_history_check_decorator(self, *args, **kwargs):
          if ConnectionBasic.max_history is 0:
              raise IndexError("ConnectionBasic.max_history is set to 0, "
                               "therefore this functionality is disabled")
          return func(self, *args, **kwargs)
  
      return no_history_check_decorator
docs: Decorator function to setup a check to see if history has been turned off,
      because if it has then the decorated function needs to throw an exception
      :param func: function to decorate
      :return: original results or exception