code: def unicode_compatible(cls):
      """
      Decorator for unicode compatible classes. Method ``__unicode__``
      has to be implemented to work decorator as expected.
      """
      if PY3:
          cls.__str__ = cls.__unicode__
          cls.__bytes__ = lambda self: self.__str__().encode("utf-8")
      else:
          cls.__str__ = lambda self: self.__unicode__().encode("utf-8")
  
      return cls
  
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 1 for calling a global function with example usage: unicode_compatible(cls) and returns: cls