def determine_game_winner(dict_live):

    """
    Given a dict containing data from a live feed, determines the game winner.
    This is done by checking which team scored more goals, or, if there was
    a shootout, which team scored more goals in the shootout.

    :param dict_live: dict containing live feed data
    :return: string 'home' or 'away'
    """

    if dict_live['liveData']['linescore']['hasShootout']:
        shootout = 1
        away_goals = dict_live['liveData']['linescore']['shootoutInfo']['away']['scores']
        home_goals = dict_live['liveData']['linescore']['shootoutInfo']['home']['scores']
    else:
        shootout = 0
        away_goals = dict_live['liveData']['boxscore']['teams']['away']['teamStats']['teamSkaterStats']['goals']
        home_goals = dict_live['liveData']['boxscore']['teams']['home']['teamStats']['teamSkaterStats']['goals']

    winner = 'home' if home_goals > away_goals else 'away'

    return winner