def validate(self):
        if import_error:
            message = 'energy_model instrument requires pandas, jinja2 and matplotlib Python packages to be installed; got: "{}"'
            raise InstrumentError(message.format(import_error.message))
        for capability in ['cgroups', 'cpuidle']:
            if not self.device.has(capability):
                message = 'The Device does not appear to support {}; does it have the right module installed?'
                raise ConfigError(message.format(capability))
        device_cores = set(self.device.core_names)
        if (self.power_metric and self.energy_metric) or not (self.power_metric or self.energy_metric):
            raise ConfigError('Either power_metric or energy_metric must be specified (but not both).')
        if not device_cores:
            raise ConfigError('The Device does not appear to have core_names configured.')
        elif len(device_cores) != 2:
            raise ConfigError('The Device does not appear to be a big.LITTLE device.')
        if self.big_core and self.big_core not in self.device.core_names:
            raise ConfigError('Specified big_core "{}" is in divice {}'.format(self.big_core, self.device.name))
        if not self.big_core:
            self.big_core = self.device.core_names[-1]  # the last core is usually "big" in existing big.LITTLE devices
        if not self.device_name:
            self.device_name = self.device.name
        if self.num_of_freqs_to_thermal_adjust and not instrument_is_installed('daq'):
            self.logger.warn('Adjustment for thermal effect requires daq instrument. Disabling adjustment')
            self.num_of_freqs_to_thermal_adjust = 0
dataset/ETHPy150Open ARM-software/workload-automation/wlauto/instrumentation/energy_model/__init__.py/EnergyModelInstrument.validate/original