

def transform(self, node, results):
    import_mod = results.get('module_name')
    if import_mod:
        mod_name = import_mod.value
        new_name = unicode(self.mapping[mod_name])
        import_mod.replace(Name(new_name, prefix=import_mod.prefix))
        if ('name_import' in results):
            self.replace[mod_name] = new_name
        if ('multiple_imports' in results):
            results = self.match(node)
            if results:
                bare_name.transform(node, results)
    else:
        bare_name = results['bare_with_attr'][0]
        new_name = self.replace.get(bare_name.value)
        if new_name:
            bare_name.replace(Name(new_name, prefix=bare_name.prefix))

dataset/ETHPy150Open PythonCharmers/python-future/src/libfuturize/fixes/fix_UserDict.py FixUserdict.transform/VarMisuse@104/143 `self`->`bare_name`