def _remove_repeated(inds):
 sum_index = {}
 for i in inds:
  if (i in sum_index):
   sum_index[i] += 1
  else:
   sum_index[i] = 0
 inds = [x for x in inds if (not sum_index[x])]
 return (set(inds), tuple([i for i in sum_index if sum_index[i]]))

def _remove_repeated ( inds ) : sum_index = { } for i in inds : if ( i in sum_index ) : sum_index [ i ] += 1 else : sum_index [ i ] = 0 inds = [ x for x in inds if ( not sum_index [ x ] ) ] return ( set ( inds ) , tuple ( [ i for i in sum_index if sum_index [ i ] ] ) )
removes repeated objects from sequences returns a set of the unique objects and a tuple of all that have been removed .