code: def deep_unicode(s, encodings=None):
      
      if encodings is None:
          encodings = ['utf-8', 'latin-1']
      if isinstance(s, (list, tuple)):
          return [deep_unicode(i) for i in s]
      if isinstance(s, dict):
          return dict([
              (deep_unicode(key), deep_unicode(s[key]))
              for key in s
          ])
          # in_dict = {}
          # for key in s:
          #     in_dict[to_unicode(key)] = to_unicode(s[key])
          # return in_dict
      elif isinstance(s, str):
          for encoding in encodings:
              try:
                  return s.decode(encoding)
              except:
                  pass
      return s
docs: decode "DEEP" S using the codec registered for encoding.