code: def _restricted_growth_notation(l):
          
  
          list_length = len(l)
  
          d = defaultdict(list)
          for (i, element) in enumerate(l):
              d[element].append(i)
  
          l2 = [None] * list_length
  
          for (name, index_list) in enumerate(sorted(d.values(), key=min)):
              for index in index_list:
                  l2[index] = name
  
          return tuple(l2)
docs: The clustering returned by the hcluster module gives group
          membership without regard for numerical order This function preserves
          the group membership, but sorts the labelling into numerical order