<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def live_scores(self, live_scores):
 """Store output of live scores to a CSV file"""

        headers = ['League', 'Home Team Name', 'Home Team Goals',
                   'Away Team Goals', 'Away Team Name']
        result = [headers]
        result.extend([game['league'], game['homeTeamName'],
                       game['goalsHomeTeam'], game['goalsAwayTeam'],
                       game['awayTeamName']] for game in live_scores['games'])
        self.generate_output(result)