def uniqualize(l,**kwargs):
if('<STR_LIT>' in kwargs):<EOL><INDENT>mode = kwargs['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>mode = '<STR_LIT>'<EOL><DEDENT>pt = copy.deepcopy(l)<EOL>seqs =[]<EOL>freq = {}<EOL>for i in range(<NUM_LIT:0>,pt.__len__()):<EOL><INDENT>v = pt[i]<EOL>if(v in freq):<EOL><INDENT>freq[v] = freq[v] + <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>freq[v] = <NUM_LIT:0><EOL>seqs.append(i)<EOL><DEDENT><DEDENT>npt = select_seqs(pt,seqs)<EOL>pt = npt<EOL>if(mode == '<STR_LIT>'):<EOL><INDENT>return(npt)<EOL><DEDENT>else:<EOL><INDENT>l.clear()<EOL>l.extend(npt)<EOL>return(l)<EOL><DEDENT>
from elist.elist import *
l = [1, 2, 2]
new = uniqualize(l)
new
id(l)
id(new)
####
l = [1, 2, 2]
rslt = uniqualize(l,mode="original")
rslt
id(l)
id(rslt)