code: def rename_module(new, old):
      
      try:
          sys.modules[new] = imp.load_module(old, *imp.find_module(old))
          return True
      except ImportError:
          return False
docs: Attempts to import the old module and load it under the new name.
      Used for purely cosmetic name changes in Python 3.x.