code: def one_hot(x, depth):
      """
      One-hot encodes the integer array `x` in an array of length `depth`.
      :param x: a np.array of integers.
      :param depth: size of the one-hot vectors.
      :return: an array of shape `x.shape + (depth, )`
      """
      x = np.array(x).astype(int)
      out = np.eye(depth)[x]
  
      return out
  
imports: import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: one_hot(x, depth) and returns: out