docs: function(opts) {
    var newOpts = {};
    if (opts.topology === 'standalone') {
      newOpts.auth = null;
      if (Number(opts.version) > 2.6) {
        newOpts.setParameter = 'authenticationMechanisms=' + opts.auth_mechanism;
      }
      return newOpts;
    }
    if (opts.topology === 'replicaset') {
      newOpts.auth = null;
      newOpts.keyFile = opts.keyFile;
      if (Number(opts.version) > 2.6) {
        newOpts.setParameter = 'authenticationMechanisms=' + opts.auth_mechanism;
      }
      return newOpts;
    }
    if (opts.topology === 'cluster') {
      newOpts.replicasetOptions = {};
      newOpts.replicasetOptions.auth = null;
      newOpts.replicasetOptions.keyFile = opts.keyFile;
      if (Number(opts.version) > 2.6) {
        newOpts.replicasetOptions.setParameter =
          'authenticationMechanisms=' + opts.auth_mechanism;
      }
      newOpts.configsOptions = {};
      newOpts.configsOptions.auth = null;
      newOpts.configsOptions.keyFile = opts.keyFile;
      newOpts.mongosOptions = {};
      newOpts.mongosOptions.keyFile = opts.keyFile;
      return newOpts;
    }
    return opts;
  }