def place_piece(piece, x, y, board):
    """
Utility function that places the piece at a
given(x, y)
coordinate
on
the
given
board if possible
Will
overwrite
the
current
value
at(x, y), no
matter
what
that
piece is
Returns
True if the
piece is placed
successfully and False
otherwise
Arg
piece: string - represents
a
piece
on
the
board('*' is an
empty
piece, '2' '8'
etc.represent
filled
spots)
Arg
x: integer - x
coordinate
Arg
y: integer - y
coordinate
Arg
board: board - the
board
you
wish
to
place
the
piece
on
"""
    # Ensure that x and y are both integers (use assert)
    assert type(x) == type(y) == int, "Coordinates must be integers"

    # What are the dimensions of the board?
    N = len(board)
    # Checking that the (x,y) coordinates given are valid for the board
    if x >= N or y >= N or x < 0 or y < 0:
        return False
    # Placing the piece on the board
    board[y][x] = piece
    return True