def getTeamLevels(self):
        try:
            return self.teamLevels
        except __HOLE__:
            teamTalentTierTimes = self.getTeamTalentTierTimes()
            self.teamLevels = [[], []]
            for teamIndex in xrange(2):
                talentTierTimes = teamTalentTierTimes[teamIndex]
                levelTimes = [0] * talentTierTimes[-1]['level']
                for firstTier, nextTier in zip(talentTierTimes, talentTierTimes[1:]):
                    levelRange = nextTier['level'] - firstTier['level']
                    for level in xrange(firstTier['level'], nextTier['level']+1):
                        levelIndex = level-1
                        lerp = float(level - firstTier['level']) / levelRange
                        time = lerp * (nextTier['earliest'] - firstTier['earliest']) + firstTier['earliest']
                        levelTimes[levelIndex] = time
                levelToTalentTierInfo = {}
                for tierInfo in talentTierTimes:
                    levelToTalentTierInfo[str(tierInfo['level'])] = tierInfo
                for levelIndex, time in enumerate(levelTimes):
                    level = levelIndex + 1
                    levelInfo = {
                        'level': levelIndex + 1,
                        'seconds': time,
                        'is_talent_tier': False,
                    }
                    if levelToTalentTierInfo.has_key(str(level)):
                        tierInfo = levelToTalentTierInfo[str(level)]
                        levelInfo['is_talent_tier'] = True
                        levelInfo['earliest_talent_picked_time'] = tierInfo['earliest']
                        levelInfo['latest_talent_picked_time'] = tierInfo['latest']
                    self.teamLevels[teamIndex].append(levelInfo)
        return self.teamLevels
dataset/ETHPy150Open karlgluck/heroes-of-the-storm-replay-parser/stormreplay/analyzer.py/StormReplayAnalyzer.getTeamLevels