code: def to_unicode(x, unaccent=False):
      
      s = str(x)
  
      if unaccent:
          cs = [c for c in unicodedata.normalize('NFD', s)
                if unicodedata.category(c) != 'Mn']
          s = ''.join(cs)
  
      return s
docs: Convert a string to unicode