def get_piece(x, y, board):
    """
    Utility function that gets the piece at a given (x,y) coordinate on the given board
    Returns the piece if the request was valid and None if the request was not valid
    Arg x: integer - x coordinate
    Arg y: integer - y coordinate
    Arg board: board - the board you wish to get the piece from
    """

    #Ensure that x and y are both integers (use assert)
    assert type(x) == int and type(y) == int, "Error: not an integer"

    #What does this do?
        # finds the length of the board
    N = len(board)

    #Checking that the (x,y) coordinates given are valid for the N x N board
    if not (x >= 0 and x < N and y >= 0 and y < N):
        return None

    #Getting the piece on the board
    return board[y][x]