docs: def set_debug(self, new):
          """
          Set debug mode.
  
          @param new: new value
          @type new: bool
  
          @return: old value
          @rtype: bool
          """
          if type(new) is not bool:
              raise pyhsm.exception.YHSM_WrongInputType(
                  'new', bool, type(new))
          old = self.debug
          self.debug = new
          self.stick.set_debug(new)
          return old