code: function applyRetryableWrites(target, db) {
    if (db && db.s.options.retryWrites) {
      target.retryWrites = true;
    }
  
    return target;
  }
docs: Applies retryWrites: true to a command if retryWrites is set on the command's database.
  
  @param {object} target The target command to which we will apply retryWrites.
  @param {object} db The database from which we can inherit a retryWrites value.