code: def do_renegotiate(self) -> None:
          
          if not self._is_handshake_completed:
              raise IOError('SSL Handshake was not completed; cannot renegotiate.')
  
          self._ssl.renegotiate()
          self.do_handshake()
docs: Initiate an SSL renegotiation.