Return team stats of a game with matching id.

    The additional pitching/batting is mostly the same stats. MLB decided
    to have two box score files, thus we return the data from both.

def team_stats(game_id):
    """Return team stats of a game with matching id.

    The additional pitching/batting is mostly the same stats. MLB decided
    to have two box score files, thus we return the data from both.
    """
    # get data from data module
    box_score = mlbgame.data.get_box_score(game_id)
    raw_box_score = mlbgame.data.get_raw_box_score(game_id)
    # parse XML
    box_score_tree = etree.parse(box_score).getroot()
    raw_box_score_tree = etree.parse(raw_box_score).getroot()
    # get pitching and batting ingo
    pitching = box_score_tree.findall('pitching')
    batting = box_score_tree.findall('batting')
    # dictionary for output
    output = {}
    output = __team_stats_info(pitching, output, 'pitching')
    output = __team_stats_info(batting, output, 'batting')
    output = __raw_team_stats_info(raw_box_score_tree, output)
    return output