docs: function executeFindCommand(bson, ns, cmd, cursorState, topology, options) {
    // Ensure we have at least some options
    options = options || {};
    // Get the readPreference
    const readPreference = getReadPreference(cmd, options);
  
    // Set the optional batchSize
    cursorState.batchSize = cmd.batchSize || cursorState.batchSize;
  
    // Build command namespace
    const parts = ns.split(/\./);
    // Command namespace
    const commandns = `${parts.shift()}.$cmd`;
  
    // Build actual find command
    let findCmd = {
      find: parts.join('.')
    };
  
    // I we provided a filter
    if (cmd.query) {
      // Check if the user is passing in the $query parameter
      if (cmd.query['$query']) {
        findCmd.filter = cmd.query['$query'];
      } else {
        findCmd.filter = cmd.query;
      }
    }
  
    // Sort value
    let sortValue = cmd.sort;
  
    // Handle issue of sort being an Array
    if (Array.isArray(sortValue)) {
      const sortObject = {};
  
      if (sortValue.length > 0 && !Array.isArray(sortValue[0])) {
        let sortDirection = sortValue[1];
        // Translate the sort order text
        if (sortDirection === 'asc') {
          sortDirection = 1;
        } else if (sortDirection === 'desc') {
          sortDirection = -1;
        }
  
        // Set the sort order
        sortObject[sortValue[0]] = sortDirection;
      } else {
        for (var i = 0; i < sortValue.length; i++) {
          let sortDirection = sortValue[i][1];
          // Translate the sort order text
          if (sortDirection === 'asc') {
            sortDirection = 1;
          } else if (sortDirection === 'desc') {
            sortDirection = -1;
          }
  
          // Set the sort order
          sortObject[sortValue[i][0]] = sortDirection;
        }
      }
  
      sortValue = sortObject;
    }
  
    // Add sort to command
    if (cmd.sort) findCmd.sort = sortValue;
    // Add a projection to the command
    if (cmd.fields) findCmd.projection = cmd.fields;
    // Add a hint to the command
    if (cmd.hint) findCmd.hint = cmd.hint;
    // Add a skip
    if (cmd.skip) findCmd.skip = cmd.skip;
    // Add a limit
    if (cmd.limit) findCmd.limit = cmd.limit;
  
    // Check if we wish to have a singleBatch
    if (cmd.limit < 0) {
      findCmd.limit = Math.abs(cmd.limit);
      findCmd.singleBatch = true;
    }
  
    // Add a batchSize
    if (typeof cmd.batchSize === 'number') {
      if (cmd.batchSize < 0) {
        if (cmd.limit !== 0 && Math.abs(cmd.batchSize) < Math.abs(cmd.limit)) {
          findCmd.limit = Math.abs(cmd.batchSize);
        }
  
        findCmd.singleBatch = true;
      }
  
      findCmd.batchSize = Math.abs(cmd.batchSize);
    }
  
    // If we have comment set
    if (cmd.comment) findCmd.comment = cmd.comment;
  
    // If we have maxScan
    if (cmd.maxScan) findCmd.maxScan = cmd.maxScan;
  
    // If we have maxTimeMS set
    if (cmd.maxTimeMS) findCmd.maxTimeMS = cmd.maxTimeMS;
  
    // If we have min
    if (cmd.min) findCmd.min = cmd.min;
  
    // If we have max
    if (cmd.max) findCmd.max = cmd.max;
  
    // If we have returnKey set
    findCmd.returnKey = cmd.returnKey ? cmd.returnKey : false;
  
    // If we have showDiskLoc set
    findCmd.showRecordId = cmd.showDiskLoc ? cmd.showDiskLoc : false;
  
    // If we have snapshot set
    if (cmd.snapshot) findCmd.snapshot = cmd.snapshot;
  
    // If we have tailable set
    if (cmd.tailable) findCmd.tailable = cmd.tailable;
  
    // If we have oplogReplay set
    if (cmd.oplogReplay) findCmd.oplogReplay = cmd.oplogReplay;
  
    // If we have noCursorTimeout set
    if (cmd.noCursorTimeout) findCmd.noCursorTimeout = cmd.noCursorTimeout;
  
    // If we have awaitData set
    if (cmd.awaitData) findCmd.awaitData = cmd.awaitData;
    if (cmd.awaitdata) findCmd.awaitData = cmd.awaitdata;
  
    // If we have partial set
    if (cmd.partial) findCmd.partial = cmd.partial;
  
    // If we have collation passed in
    if (cmd.collation) findCmd.collation = cmd.collation;
  
    // If we have explain, we need to rewrite the find command
    // to wrap it in the explain command
    if (cmd.explain) {
      findCmd = {
        explain: findCmd
      };
    }
  
    // Did we provide a readConcern
    if (cmd.readConcern) findCmd.readConcern = cmd.readConcern;
  
    // Set up the serialize and ignoreUndefined fields
    const serializeFunctions =
      typeof options.serializeFunctions === 'boolean' ? options.serializeFunctions : false;
    const ignoreUndefined =
      typeof options.ignoreUndefined === 'boolean' ? options.ignoreUndefined : false;
  
    // We have a Mongos topology, check if we need to add a readPreference
    if (topology.type === 'mongos' && readPreference && readPreference.preference !== 'primary') {
      findCmd = {
        $query: findCmd,
        $readPreference: readPreference.toJSON()
      };
    }
  
    // optionally decorate query with transaction data
    const err = decorateWithSessionsData(findCmd, options.session, options);
    if (err) {
      return err;
    }
  
    // Build Query object
    const query = new Query(bson, commandns, findCmd, {
      numberToSkip: 0,
      numberToReturn: 1,
      checkKeys: false,
      returnFieldSelector: null,
      serializeFunctions: serializeFunctions,
      ignoreUndefined: ignoreUndefined
    });
  
    // Set query flags
    query.slaveOk = readPreference.slaveOk();
  
    // Return the query
    return query;
  }