

def transform(self, node, results):
    unifunc = results['unifunc']
    strfunc = Name('__str__', prefix=unifunc.prefix)
    unifunc.replace(strfunc)
    klass = node.clone()
    klass.prefix = ('\n' + find_indentation(node))
    decorator = Node(syms.decorator, [Leaf(token.AT, '@'), Name('python_2_unicode_compatible')])
    decorated = Node(syms.decorated, [decorator, klass], prefix=node.prefix)
    node.replace(decorated)
    touch_import('django.utils.encoding', 'python_2_unicode_compatible', decorated)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/utils/2to3_fixes/fix_unicode.py FixUnicode.transform/original