code: function createConnection(connectionOptions, config)
    {
      // create a new ConnectionConfig and skip credential-validation if a config
      // object has been specified; this is because if a config object has been
      // specified, we're trying to deserialize a connection and the account name,
      // username and password don't need to be specified because the config
      // object already contains the tokens we need
      var connectionConfig =
          new ConnectionConfig(connectionOptions, !config, qaMode, clientInfo);
  
      // if an http client was specified in the options passed to the module, use
      // it, otherwise create a new HttpClient
      var httpClient = options.httpClient ||
              new options.httpClientClass(connectionConfig);
  
      return new connectionClass(
          new ConnectionContext(connectionConfig, httpClient, config));
    }
docs: Creates a new Connection instance.
  
  @param {Object} connectionOptions
  @param {Object} [config]
  
  @returns {Object}