def _almost_flatten(metrics):
    metric_part_list = list()
    metric_head = metrics[0]
    metric_tail = metrics[1:]
    # print "metric_head, metric_tail: {0}, {1}".format(metric_head, metric_tail)
    if metric_tail == []:
        return [metric_head]
    for mt in metric_tail:
        result = _almost_flatten(mt)
        # print "result is {0}".format(result)
        for r in result:
            tail_list   = list()
            tail_list.append(metric_head)
            if type(r) in (type(list()), type(tuple())):
                tail_list.extend(r)
            else:
                tail_list.append(r)
            metric_part_list.append(tail_list)
    return metric_part_list
Returns a c_cudaDeviceProp
dataset/ETHPy150Open pcn/pyKairosDB/pyKairosDB/util.py/_almost_flatten--crossover with--dataset/ETHPy150Open NVIDIA/DIGITS/digits/device_query.py/get_device