code: def disconnect(self, sid=None):
          
          if sid is not None:
              try:
                  socket = self._get_socket(sid)
              except KeyError:  # pragma: no cover
                  # the socket was already closed or gone
                  pass
              else:
                  socket.close()
                  del self.sockets[sid]
          else:
              for client in six.itervalues(self.sockets):
                  client.close()
              self.sockets = {}
docs: Disconnect a client.
  
          :param sid: The session id of the client to close. If this parameter
                      is not given, then all clients are closed.