code: def one_hot2indices(one_hots):
      
      indices = []
      for one_hot in one_hots:
          indices.append(argmax(one_hot))
      return indices
docs: Convert an iterable of one-hot encoded targets to a list of indices.
  
      Parameters
      ----------
      one_hot : list
  
      Returns
      -------
      indices : list
  
      Examples
      --------
      >>> one_hot2indices([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
      [0, 1, 2]
  
      >>> one_hot2indices([[1, 0], [1, 0], [0, 1]])
      [0, 0, 1]