<commit_before>var mpd = require('mpd'),
    _ = require('underscore'),
    inherits = require('util').inherits,
    EventEmitter = require('events').EventEmitter;

/**
 * Represents wrapper for MPD client that makes sure the its connection is
 * alive.
 *
 * @param {Object} options List of pool objects. It could contains the following
 * keys:
 *  - "host": string, MPD server host to connect to.
 *  - "port": integer, MPD server port to connect to.
 *  - "reconnect": boolean, indicates if connection to MPD server should be
 *    restored when failed. The default value is true.<commit_msg>Add docs to MPD pool events<commit_after>var mpd = require('mpd'),
    _ = require('underscore'),
    inherits = require('util').inherits,
    EventEmitter = require('events').EventEmitter;

/**
 * Represents wrapper for MPD client that makes sure the its connection is
 * alive.
 *
 * This class inherits behaviour of EventEmitter and emits the following events:
 *  - "connect": a connection to MPD server is established. An instance of MPD
 *    client will be passed to event's listeners as the first argument.
 *  - "disconnect": the current connection to MPD server is lost. An instance
 *    of MPD client will be passed to event's listeners as the first argument.
 *  - "error": the current connection to MPD server caused error. The rrror
 *    object will be passed to event's listeners as the first argument.
 *
 * @param {Object} options List of pool objects. It could contains the following
 * keys:
 *  - "host": string, MPD server host to connect to.
 *  - "port": integer, MPD server port to connect to.
 *  - "reconnect": boolean, indicates if connection to MPD server should be
 *    restored when failed. The default value is true.
{'fraction_non_alphanumeric': 0.09278350515463918, 'fraction_numerical': 0.0, 'mean_word_length': 3.646276595744681, 'pattern_counts': {'":': 9, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6837765', 'n_tokens_mistral': 470, 'n_tokens_neox': 469, 'n_words': 220}