def __init__(self, **kwargs):  # pylint: disable=W0231
        try:
            self.device_id = kwargs.pop('device_id') or self.default_device_id
            self.v_range = float(kwargs.pop('v_range') or self.default_v_range)
            self.dv_range = float(kwargs.pop('dv_range') or self.default_dv_range)
            self.sampling_rate = int(kwargs.pop('sampling_rate') or self.default_sampling_rate)
            self.resistor_values = kwargs.pop('resistor_values') or []
            self.channel_map = kwargs.pop('channel_map') or self.default_channel_map
            self.labels = (kwargs.pop('labels') or
                           ['PORT_{}.csv'.format(i) for i in xrange(len(self.resistor_values))])
        except __HOLE__, e:
            raise ConfigurationError('Missing config: {}'.format(e.message))
        if kwargs:
            raise ConfigurationError('Unexpected config: {}'.format(kwargs))
dataset/ETHPy150Open ARM-software/workload-automation/wlauto/external/daq_server/src/daqpower/config.py/DeviceConfiguration.__init__