def get_head(observation):
  """Given the current state of the snake environment, finds where the head of the snake is.
    Args:
      observation (numpy array): a 4xMxN ndarray.
    Returns:
      tuple: a tuple of length 2 representing the location of the head of the snake on a 2D grid.
  """
  one_hot_head = observation[0]
  for i in range(one_hot_head.shape[0]):
    for j in range(one_hot_head.shape[1]):
      if one_hot_head[i][j] == 1:
        return (i, j)
  return (-1, -1)