@contract
def write_vm_data_locally(path, data, data_length):
    for uuid, values in data.items():
        with open(os.path.join(path, uuid), 'w') as f:
            if data_length > 0:
                f.write('\n'.join([str(x)
                                   for x in values[-data_length:]]) + '\n')
Write a set of CPU MHz values for a set of VMs.
dataset/ETHPy150Open beloglazov/openstack-neat/neat/locals/collector.py/write_vm_data_locally