def __init__(self, config=None):
        """
        Create a new instance of the StatsdHandler class
        """
        # Initialize Handler
        Handler.__init__(self, config)
        logging.debug("Initialized statsd handler.")

        if not statsd:
            self.log.error('statsd import failed. Handler disabled')
            self.enabled = False
            return

        if not hasattr(statsd, 'StatsClient'):
            self.log.warn('python-statsd support is deprecated '
                          'and will be removed in the future. '
                          'Please use https://pypi.python.org/pypi/statsd/')

        # Initialize Options
        self.host = self.config['host']
        self.port = int(self.config['port'])
        self.batch_size = int(self.config['batch'])
        self.metrics = []
        self.old_values = {}

        # Connect
        self._connect()

        Create a new instance of the StatsdHandler class
        
src/diamond/handler/stats_d.py