parameters: (game_path)
return_statement: return (extract_corners(moves), 1 if g.get_winner().lower() == 'b' else 0)
docstring: In addition to the corner information returned, we also add the winner,
      returning a tuple of ((sequence_counts, nextmove_counts), winner)
      where `winner` == 1 for B win, 0 otherwise.
docstring_summary: In addition to the corner information returned, we also add the winner,
      returning a tuple of ((sequence_counts, nextmove_counts), winner)
      where `winner` == 1 for B win, 0 otherwise.
docstring_tokens: In addition to the corner information returned we also add the winner returning a tuple of (( sequence_counts nextmove_counts ) winner ) where winner == 1 for B win 0 otherwise .
function: def extract_from_game(game_path):
      """
      In addition to the corner information returned, we also add the winner,
      returning a tuple of ((sequence_counts, nextmove_counts), winner)
      where `winner` == 1 for B win, 0 otherwise.
      """
      with open(game_path) as sgf_file:
          game_data = sgf_file.read().encode('utf-8')
  
      try:
          g = sgf.Sgf_game.from_bytes(game_data)
          _, moves = sgf_moves.get_setup_and_moves(g)
      except BaseException:
          print("bad file: ", game_path)
          return Counter(), {}
  
      return (extract_corners(moves), 1 if g.get_winner().lower() == 'b' else 0)
function_tokens: def extract_from_game ( game_path ) : with open ( game_path ) as sgf_file : game_data = sgf_file . read ( ) . encode ( 'utf-8' ) try : g = sgf . Sgf_game . from_bytes ( game_data ) _ , moves = sgf_moves . get_setup_and_moves ( g ) except BaseException : print ( "bad file: " , game_path ) return Counter ( ) , { } return ( extract_corners ( moves ) , 1 if g . get_winner ( ) . lower ( ) == 'b' else 0 )