code: def close(self):
          
  
          try:
              self.shutdown()
  
          finally:
              if self._socket:
                  try:
                      self._socket.close()
                  except (socket_.error):
                      pass
                  self._socket = None
docs: Shuts down the TLS session and socket and forcibly closes it