code: def localSslFixup(host, sslContext):
      
      if not sslContext and host in ['localhost', '127.0.0.1', '::1']:
          import ssl
          if hasattr(ssl, '_create_unverified_context'):
              sslContext = ssl._create_unverified_context()
      return sslContext
docs: Connections to 'localhost' do not need SSL verification as a certificate
      will never match. The OS provides security by only allowing root to bind
      to low-numbered ports.