code: def consecutive_cluster(src):
      unique, inv = torch.unique(src, sorted=True, return_inverse=True)
      perm = torch.arange(
          inv.size(0), dtype=inv.dtype, device=inv.device
      )
      perm = inv.new_empty(unique.size(0)).scatter_(0, inv, perm)
      return inv, perm
  
label_desc: Use image node_id 1 for calling a global function with example usage: consecutive_cluster(src) and returns: inv,  perm