def METHOD_NAME(self, response):
    """Read and decode a PyPI HTTP response."""
    import cgi
    content_type = response.getheader('content-type', 'text/plain')
    encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii')
    return response.read().decode(encoding)