code: function executeCommand(db, command, options, callback) {
    // Did the user destroy the topology
    if (db.serverConfig && db.serverConfig.isDestroyed())
      return callback(new MongoError('topology was destroyed'));
    // Get the db name we are executing against
    const dbName = options.dbName || options.authdb || db.s.databaseName;
  
    // Convert the readPreference if its not a write
    options.readPreference = resolveReadPreference(options, { db, default: ReadPreference.primary });
  
    // Debug information
    if (db.s.logger.isDebug())
      db.s.logger.debug(
        `executing command ${JSON.stringify(
          command
        )} against ${dbName}.$cmd with options [${JSON.stringify(
          debugOptions(debugFields, options)
        )}]`
      );
  
    // Execute command
    db.s.topology.command(`${dbName}.$cmd`, command, options, (err, result) => {
      if (err) return handleCallback(callback, err);
      if (options.full) return handleCallback(callback, null, result);
      handleCallback(callback, null, result.result);
    });
  }
docs: Execute a command
  
  @method
  @param {Db} db The Db instance on which to execute the command.
  @param {object} command The command hash
  @param {object} [options] Optional settings. See Db.prototype.command for a list of options.
  @param {Db~resultCallback} [callback] The command result callback