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

Prefer the more modern naming.

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.

Map the Python2 `exceptions` module to `builtins` because
`builtins` is a superset and contains everything that is
available in `exceptions`, which makes the translation simpler.

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