code: def to_unicode(obj, encoding='utf-8'):
      
      if isinstance(obj, string_types) or isinstance(obj, binary_type):
          if not isinstance(obj, text_type):
              obj = text_type(obj, encoding)
      return obj
docs: Convert string to unicode string