def _get_winner(sgf_game):
    """Reads the games winner from an sgf.
    Args:
        sgf_game: from bytes parsed sgf
    Returns:
        1 if BLACK won
       -1 if WHITE won
        0 if it was a DRAW
    """
    sgf_winner = sgf_game.get_winner()

    if sgf_winner == 'b':
        winner = 1
    elif sgf_winner == 'w':
        winner = -1
    else:
        winner = 0

    return winner