code: def unicode_compatible(cls):
      
      if not is_py3:
          cls.__unicode__ = cls.__str__
          cls.__str__ = lambda self: self.__unicode__().encode('utf-8')
      return cls
docs: A decorator that defines ``__str__`` and ``__unicode__`` methods
      under Python 2.