code: def increment_error(self, error: Exception):
          '''Increment the error counter preferring base exceptions.'''
          _logger.debug('Increment error %s', error)
  
          for error_class in ERROR_PRIORITIES:
              if isinstance(error, error_class):
                  self.errors[error_class] += 1
                  return
  
          self.errors[type(error)] += f increment_error(self, error: Exception):
          '''Increment the error counter preferring base exceptions.'''
          _logger.debug('Increment error %s', error)
  
          for error_class in ERROR_PRIORITIES:
              if isinstance(error, error_class):
                  self.errors[error_class] += 1
                  return
  
          self.errors[type(error)] += 1
docs: Increment the error counter preferring base exceptions.