code: function resetServerState(server, error, options) {
    options = Object.assign({}, { clearPool: false }, options);
  
    function resetState() {
      server.emit(
        'descriptionReceived',
        new ServerDescription(server.description.address, null, { error })
      );
    }
  
    if (options.clearPool && server.pool) {
      server.pool.reset(() => resetState());
      return;
    }
  
    resetState();
  }
docs: Resets the internal state of this server to `Unknown` by simulating an empty ismaster
  
  @private
  @param {Server} server
  @param {MongoError} error The error that caused the state reset
  @param {object} [options] Optional settings
  @param {boolean} [options.clearPool=false] Pool should be cleared out on state reset