@contract
def best_fit_decreasing_factory(time_step, migration_time, params):
    return lambda hosts_cpu_usage, hosts_cpu_total, \
                  hosts_ram_usage, hosts_ram_total, \
                  inactive_hosts_cpu, inactive_hosts_ram, \
                  vms_cpu, vms_ram, state=None: \
        (best_fit_decreasing(
            params['last_n_vm_cpu'],
            get_available_resources(
                    params['cpu_threshold'],
                    hosts_cpu_usage,
                    hosts_cpu_total),
            get_available_resources(
                    params['ram_threshold'],
                    hosts_ram_usage,
                    hosts_ram_total),
            inactive_hosts_cpu,
            inactive_hosts_ram,
            vms_cpu,
            vms_ram),
         {})
Set the enabled state on the underlying control.
dataset/ETHPy150Open beloglazov/openstack-neat/neat/globals/vm_placement/bin_packing.py/best_fit_decreasing_factory--crossover with--dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/qt/qt_action.py/QtAction.set_enabled