code: def to_unicode(text):
      
      if isinstance(text, unicode):
          return text
      if isinstance(text, six.string_types):
          return decode_to_unicode(text)
      return unicode(text)
docs: Convert to unicode.