code: def to_unicode(object):
      if isinstance(object, unicode):
          return object
      elif isinstance(object, bytes):
          return object.decode("utf-8")
      else:
          # try decode instance to unicode
          return instance_to_unicode(object)
  
file_path: sumy/sumy/_compat.py
imports: from __future__ import absolute_import
  from __future__ import division, print_function, unicode_literals
  from sys import version_info
label_desc: Use image node_id 4 for calling a global function with example usage: to_unicode(object) and returns: object, object, instance_to_unicode