code: def decode_centroids(encoded, mapping):
      """Decodes the encoded centroids array back to the original data
      labels using a list of mappings.
      """
      decoded = []
      for ii in range(encoded.shape[1]):
          # Invert the mapping so that we can decode.
          inv_mapping = {v: k for k, v in mapping[ii].items()}
          decoded.append(
              np.vectorize(inv_mapping.__getitem__)(encoded[:, ii])
          )
      return np.atleast_2d(np.array(decoded)).T
  
imports: import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: decode_centroids(encoded, mapping) and returns: np