def _is_broken_pipe_error(exc_class, exc):
            """See the docstring for non-Windows Python 3 below."""
            return (exc_class is IOError and
                    exc.errno in (errno.EINVAL, errno.EPIPE))
See the docstring for non-Windows Python 3 below.
product/gradle-plugin/src/main/python/pip/_internal/utils/logging.py