def formatClusterStatus(status):
    result = {}
    for key in status.iterkeys():
        if key == 'type':
            continue
        elif key == 'remainingTime' and status[key] is not None:
            result['minutesRemaining'] = round(status[key] / 60)
        elif key in valid_machine_states:
            sizeToCount = status[key]
            for size in sizeToCount.iterkeys():
                if size != 'medium':
                    assert(sizeToCount[size] == 0)
                else:
                    result[key] = 8 * sizeToCount[size]
    return result
dataset/ETHPy150Open ufora/ufora/ufora/FORA/python/Control.py/formatClusterStatus/original