'Calculate an average value from multiple counter instances.'

def _get_performance_counter_average_multi_instance(self, counters_t1, counters_t2, counter_name, base_counter_name):

    averages = []
    instance_names = []
    for counter in counters_t1:
        if (counter_name in counter):
            instance_names.append(counter['instance-name'])
    for instance_name in instance_names:
        average = self._get_performance_counter_average(counters_t1, counters_t2, counter_name, base_counter_name, instance_name)
        averages.append(average)
    return averages
