code: def rargmax(x, eps=1e-8):
      
      idxs = np.where(abs(x - np.max(x, axis=0)) < eps)[0]
      return np.random.choice(idxs)
docs: Argmax with random tie-breaking
  
      Args:
          x: a 1-dim numpy array
      Returns:
          the argmax index