def get_size(lists):
    #    'size': [([35, 20, 15], [35, 20, 15])],
    sends = []
    receives = []
    for l in lists:
        # There are two possibilities
        # 'size': ([78, 32, 46], [78, 32, 46]),
        # 'size': [([218, 218, 0], [218, 218, 0])],
        if type(l['size'][0][0]) in (list, tuple):
            value = l['size'][0]
        else:
            value = l['size']

        #print l['size']
        #value = l['size'][0]
        send_size = value[0]
        receive_size = value[1]

        sends.append(send_size)
        receives.append(receive_size)

    avg1 = avg_lists_column(sends)
    avg2 = avg_lists_column(receives)

    return avg1, avg2
 def get_accuracy(self, condition, sub_name):
     """
     >>> d = get_simple_test_dir() + os.sep + "test_network1"
     >>> info = GetProcessedInformation(ReadReports(d))
     >>> info.get_accuracy("normal","singles") == [100.0, 100.0]
     True
     """
     precisions = self.information.get_precision(condition, sub_name)
     lists = simple_dict_to_list(precisions)
     last_list = map(lambda m: m[-1], lists)
     return avg_lists_column(last_list)