def fix(self, item):
if not self.is_python_2:<EOL><INDENT>return item<EOL><DEDENT>if isinstance(item, str):<EOL><INDENT>return item.decode("<STR_LIT:utf-8>")<EOL><DEDENT>if isinstance(item, unicode):  <EOL><INDENT>return item<EOL><DEDENT>if isinstance(item, Mapping):<EOL><INDENT>return dict(map(self.fix, item.items()))<EOL><DEDENT>elif isinstance(item, Iterable):<EOL><INDENT>return type(item)(map(self.fix, item))<EOL><DEDENT>return item<EOL>
Make sure all strings are unicode for python 2/3 compatability