def scrub_user_tags(tagcount):
 rdict = {}
 tagdict = dict(tagcount)
 for t in tagdict:
  if (not t):
   continue
  alltags = t.split(u',')
  for tag in alltags:
   if tag:
    if (not (tag in rdict)):
     rdict[tag] = 0
    rdict[tag] += tagdict[t]
 rlist = []
 for tag in rdict:
  rlist.append([tag, rdict[tag]])
 return rlist

def scrub_user_tags ( tagcount ) : rdict = { } tagdict = dict ( tagcount ) for t in tagdict : if ( not t ) : continue alltags = t . split ( u',' ) for tag in alltags : if tag : if ( not ( tag in rdict ) ) : rdict [ tag ] = 0 rdict [ tag ] += tagdict [ t ] rlist = [ ] for tag in rdict : rlist . append ( [ tag , rdict [ tag ] ] ) return rlist
rebuild tag list for tags .