def get_cluster_specs(self, old_specs, cluster, context):
        core = self.get_core_name(cluster)
        self.number_of_cpus[cluster] = sum([1 for c in self.device.core_names if c == core])

        cluster_frequencies = self.get_frequencies_param(cluster)
        if not cluster_frequencies:
            raise InstrumentError('Could not read available frequencies for {}'.format(core))
        min_frequency = min(cluster_frequencies)

        idle_states = self.get_device_idle_states(cluster)
        new_specs = []
        for state in idle_states:
            for num_cpus in xrange(1, self.number_of_cpus[cluster] + 1):
                spec = old_specs[0].copy()
                spec.workload_name = self.idle_workload
                spec.workload_parameters = self.idle_workload_params
                spec.idle_state_id = state.id
                spec.idle_state_desc = state.desc
                spec.idle_state_index = state.index
                if not self.no_hotplug:
                    spec.runtime_parameters['{}_cores'.format(core)] = num_cpus
                spec.runtime_parameters['{}_frequency'.format(core)] = min_frequency
                spec.runtime_parameters['ui'] = 'off'
                spec.cluster = cluster
                spec.num_cpus = num_cpus
                spec.id = '{}_idle_{}_{}'.format(cluster, state.id, num_cpus)
                spec.label = 'idle_{}'.format(cluster)
                spec.number_of_iterations = old_specs[0].number_of_iterations
                spec.load(self.device, context.config.ext_loader)
                spec.workload.init_resources(context)
                spec.workload.validate()
                new_specs.append(spec)
        for old_spec in old_specs:
            if ['sysbench', 'dhrystone'] not in old_spec.workload_name:
                raise ConfigError('Only sysbench and dhrystone workloads currently supported for energy_model generation.')
            for freq in cluster_frequencies:
                for num_cpus in xrange(1, self.number_of_cpus[cluster] + 1):
                    spec = old_spec.copy()
                    spec.runtime_parameters['{}_frequency'.format(core)] = freq
                    if not self.no_hotplug:
                        spec.runtime_parameters['{}_cores'.format(core)] = num_cpus
                    spec.runtime_parameters['ui'] = 'off'
                    spec.id = '{}_{}_{}'.format(cluster, num_cpus, freq)
                    spec.label = 'freq_{}_{}'.format(cluster, spec.label)
                    spec.workload_parameters['taskset_mask'] = list_to_mask(self.get_cpus(cluster))
                    spec.workload_parameters['threads'] = num_cpus
                    if old_spec.workload_name == 'sysbench':
                        # max_requests set to an arbitrary high values to make sure
                        # sysbench runs for full duriation even on highly
                        # performant cores.
                        spec.workload_parameters['max_requests'] = 10000000
                    spec.cluster = cluster
                    spec.num_cpus = num_cpus
                    spec.frequency = freq
                    spec.load(self.device, context.config.ext_loader)
                    spec.workload.init_resources(context)
                    spec.workload.validate()
                    new_specs.append(spec)
        return new_specs
dataset/ETHPy150Open ARM-software/workload-automation/wlauto/instrumentation/energy_model/__init__.py/EnergyModelInstrument.get_cluster_specs/swapped operands of `not in`