class_docstr: Connect4 Board.
docstr: Checks if player_pieces contains a diagonal win.
docstr_tok: ["Checks","if","player_pieces","contains","a","diagonal","win","."]
code: def _is_diagonal_winner(self, player_pieces):
      """Checks if player_pieces contains a diagonal win."""
      win_length = self.win_length
      for i in range(len(player_pieces) - win_length + 1):
          for j in range(len(player_pieces[0]) - win_length + 1):
              if all(
                  player_pieces[i + x][j + x] for x in range(win_length)
              ):
                  return True
          for j in range(win_length - 1, len(player_pieces[0])):
              if all(
                  player_pieces[i + x][j - x] for x in range(win_length)
              ):
                  return True
      return False
  
imports: import numpy
  from collections import namedtuple
label_desc: Use image node_id 7 for calling the Board obj's underlying member method code with example usage: obj._is_diagonal_winner(player_pieces) and returns: False, True, True