code: def get_unique(t):
      """Get unique values and lookup index from N-D tensor.
  
      Args:
        t: tensor
      Returns:
        centroids (unique values), lookup index (same shape as input tensor)
      Example:
        t:
        ([[1.0, 2.0],
          [2.0, 3.0],
          [3.0, 3.0],
          [1.0, 2.0]]
        )
        centroids(unique values):
        ([1.0, 2.0, 3.0])
        output final index:
        ([[0, 1],
          [1, 2],
          [2, 2],
          [0, 1]]
        )
      """
      t_flatten = tf.reshape(t, shape=(-1,))
      uniques, index = tf.unique(t_flatten)
      return uniques, tf.reshape(index, shape=tf.shape(t))
  
imports: import logging
  import warnings
  import tensorflow
  from tensorflow_model_optimization.python.core.clustering.keras import cluster_config
  from tensorflow_model_optimization.python.core.clustering.keras import clustering_registry
  from tensorflow_model_optimization.python.core.quantization.keras import quant_ops
  from tensorflow_model_optimization.python.core.quantization.keras import quantizers
  from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantize_registry
  from tensorflow_model_optimization.python.core.quantization.keras.default_8bit import default_8bit_quantizers
label_desc: Use image node_id 1 for calling a global function with example usage: get_unique(t) and returns: uniques,  tf