code: def league_scores(self, total_data, time):
          
          data = []
          for league, score in self.supported_leagues(total_data):
              item = {'league': league, 'homeTeamName': score['homeTeamName'],
                      'goalsHomeTeam': score['result']['goalsHomeTeam'],
                      'goalsAwayTeam': score['result']['goalsAwayTeam'],
                      'awayTeamName': score['awayTeamName']}
              data.append(item)
          self.generate_output({'league_scores': data, 'time': time})
docs: Store output of fixtures based on league and time to a JSON file