docs: function createClient(opts, cb) {
      assert.object(opts, 'opts');
      assert.string(opts.name, 'opts.name');
      assert.optionalNumber(opts.version, 'opts.version');
      assert.func(cb, 'cb');
  
      // Version given.
      if (opts.version === 1) {
          return cb(null, reg1.createClient(opts));
      } else if (opts.version === 2) {
          return cb(null, reg2.createClient(opts));
      } else if (opts.version) {
          return cb(new Error('invalid API version: ' + opts.version));
      }
  
      // First try v2.
      var client = reg2.createClient(opts);
      client.supportsV2(function (err, supportsV2) {
          if (err) {
              cb(err);
          } else if (supportsV2) {
              cb(null, client);
          } else {
              // Otherwise, fallback to v1.
              cb(null, reg1.createClient(opts));
          }
      });
  }