def prepare_ram_cpu_usage_results(MonitResult, cpu_threshold, memory_threshold, monit_results, outstanding_mem_polls, outstanding_procs, outstanding_procs_counter, program_to_check, program_to_check_cpu_usage):
    for (i, monit_result) in enumerate((MonitResult(*_) for _ in monit_results)):
        logging.debug('------ Iteration %d ------', i)
        check_memory(i, memory_threshold, monit_result, outstanding_mem_polls)
        for proc in monit_result.processes:
            update_cpu_usage_desired_program(proc, program_to_check, program_to_check_cpu_usage)
def prepare_ram_cpu_usage_results(MonitResult, cpu_threshold, memory_threshold, monit_results, outstanding_mem_polls, outstanding_procs, outstanding_procs_counter, program_to_check, program_to_check_cpu_usage):
    for (i, monit_result) in enumerate((MonitResult(*_) for _ in monit_results)):
        logging.debug('------ Iteration %d ------', i)
        check_memory(i, memory_threshold, monit_result, outstanding_mem_polls)
        for proc in monit_result.processes:
            update_cpu_usage_desired_program(proc, program_to_check, program_to_check_cpu_usage)