def __parse_stats(self, stats_file):
    stats = []
    if stats_file:
        if os.path.isfile(stats_file):
            with open(stats_file) as f:
                csv_reader = csv.DictReader(f, delimiter=',')
                for row in csv_reader:
                    stat = {}
                    stat['global_ctr'] = int(row['global_ctr'])
                    stat['time'] = int(row['time'])
                    stats.append(stat)
        else:
            warnings.warn("Stats file not found, overriding blood graph's start/end cycle with traces.")
    return stats
def __parse_stats(self, stats_file):
    stats = []
    if stats_file:
        if os.path.isfile(stats_file):
            with open(stats_file) as f:
                csv_reader = csv.DictReader(f, delimiter=',')
                for row in csv_reader:
                    stat = {}
                    stat['global_ctr'] = int(row['global_ctr'])
                    stat['time'] = int(row['time'])
                    stats.append(stat)
        else:
            warnings.warn("Stats file not found, overriding blood graph's start/end cycle with traces.")
    return stats