Given a grid, similar to the one found in the Connect4 game, write a function that check if player won
The function receives a rectangular 2D list and a player value. Return True if the player has four consecutive cells horizontally, vertically, or diagonally, and return False otherwise. Cells may contain any values, and only cells exactly equal to player count. The grid may be smaller than four cells in either dimension.
def check_winner(grid, player):