def print_stats(self):
    if (not self.stats):
        self.calculate_stats()
    print(self.tgid, ('Driver' if self.is_driver else 'App'))
    for tag in self.stats:
        print(tag, self.stats[tag])
        if self.items.get(tag):
            for item in self.items[tag]:
                print('  ', item)
        else:
            print('  ', 'calculated only')
def print_stats(self):
    if (not self.stats):
        self.calculate_stats()
    print(self.tgid, ('Driver' if self.is_driver else 'App'))
    for tag in self.stats:
        print(tag, self.stats[tag])
        if self.items.get(tag):
            for item in self.items[tag]:
                print('  ', item)
        else:
            print('  ', 'calculated only')