code: def _is_connreset(self, exc: BaseException) -> bool:
          
          return (
              isinstance(exc, (socket.error, IOError))
              and errno_from_exception(exc) in _ERRNO_CONNRESET
          )
docs: Return ``True`` if exc is ECONNRESET or equivalent.
  
          May be overridden in subclasses.