def translate_module_name(module):
    """Rename builtin modules to a consistent (Python2) module name
    This is used so that references to Python's `builtins` module can
    be loaded in both Python 2 and 3.  We remap to the "__builtin__"
    name and unmap it when importing.
    See untranslate_module_name() for the reverse operation.
    """
    if module == 'builtins' or module == 'exceptions':
        # We map the Python2 `exceptions` module to `__builtin__` because
        # `__builtin__` is a superset and contains everything that is
        # available in `exceptions`, which makes the translation simpler.
        return '__builtin__'
    else:
        return module