# Buggy code
def process_environ(self, environ):
    def _readenv(name, ctor, default):
        value = environ.get(name)
        if value is None:
            return default() if callable(default) else default
        try:
            return ctor(value)
        except Exception:
            warnings.warn(
                "environ %s defined but failed to parse '%s'" % (name, value),
                RuntimeWarning,
            )
            return default

    def optional_str(x):
        return str(x) if x is not None else None

    # developer mode produces full tracebacks, disables help instructions
    DEVELOPER_MODE = _readenv("NUMBA_DEVELOPER_MODE", int, 0)

    # disable performance warnings, will switch of the generation of
    # warnings of the class NumbaPerformanceWarning
    DISABLE_PERFORMANCE_WARNINGS = _readenv(
        "NUMBA_DISABLE_PERFORMANCE_WARNINGS", int, 0
    )

    # Flag to enable full exception reporting
    FULL_TRACEBACKS = _readenv("NUMBA_FULL_TRACEBACKS", int, DEVELOPER_MODE)

    # Show help text when an error occurs
    SHOW_HELP = _readenv("NUMBA_SHOW_HELP", int, not DEVELOPER_MODE)

    # The color scheme to use for error messages, default is no color
    # just bold fonts in use.
    COLOR_SCHEME = _readenv("NUMBA_COLOR_SCHEME", str, "no_color")

    # Debug flag to control compiler debug print
    DEBUG = _readenv("NUMBA_DEBUG", int, 0)

    # DEBUG print IR after pass names
    DEBUG_PRINT_AFTER = _readenv("NUMBA_DEBUG_PRINT_AFTER", str, "none")

    # JIT Debug flag to trigger IR instruction print
    DEBUG_JIT = _readenv("NUMBA_DEBUG_JIT", int, 0)

    # Enable debugging of front-end operation
    # (up to and including IR generation)
    DEBUG_FRONTEND = _readenv("NUMBA_DEBUG_FRONTEND", int, 0)

    # How many recently deserialized functions to retain regardless
    # of external references
    FUNCTION_CACHE_SIZE = _readenv("NUMBA_FUNCTION_CACHE_SIZE", int, 128)

    # Enable logging of cache operation
    DEBUG_CACHE = _readenv("NUMBA_DEBUG_CACHE", int, DEBUG)

    # Redirect cache directory
    # Contains path to the directory
    CACHE_DIR = _readenv("NUMBA_CACHE_DIR", str, "")

    # Enable tracing support
    TRACE = _readenv("NUMBA_TRACE", int, 0)

    # Enable debugging of type inference
    DEBUG_TYPEINFER = _readenv("NUMBA_DEBUG_TYPEINFER", int, 0)

    # Configure compilation target to use the specified CPU name
    # and CPU feature as the host information.
    # Note: this overrides "host" option for AOT compilation.
    CPU_NAME = _readenv("NUMBA_CPU_NAME", optional_str, None)
    CPU_FEATURES = _readenv(
        "NUMBA_CPU_FEATURES",
        optional_str,
        ("" if str(CPU_NAME).lower() == "generic" else None),
    )
    # Optimization level
    OPT = _readenv("NUMBA_OPT", int, 3)

    # Force dump of Python bytecode
    DUMP_BYTECODE = _readenv("NUMBA_DUMP_BYTECODE", int, DEBUG_FRONTEND)

    # Force dump of control flow graph
    DUMP_CFG = _readenv("NUMBA_DUMP_CFG", int, DEBUG_FRONTEND)

    # Force dump of Numba IR
    DUMP_IR = _readenv("NUMBA_DUMP_IR", int, DEBUG_FRONTEND or DEBUG_TYPEINFER)

    # print debug info of analysis and optimization on array operations
    DEBUG_ARRAY_OPT = _readenv("NUMBA_DEBUG_ARRAY_OPT", int, 0)

    # insert debug stmts to print information at runtime
    DEBUG_ARRAY_OPT_RUNTIME = _readenv("NUMBA_DEBUG_ARRAY_OPT_RUNTIME", int, 0)

    # print stats about parallel for-loops
    DEBUG_ARRAY_OPT_STATS = _readenv("NUMBA_DEBUG_ARRAY_OPT_STATS", int, 0)

    # prints user friendly information about parllel
    PARALLEL_DIAGNOSTICS = _readenv("NUMBA_PARALLEL_DIAGNOSTICS", int, 0)

    # print debug info of inline closure pass
    DEBUG_INLINE_CLOSURE = _readenv("NUMBA_DEBUG_INLINE_CLOSURE", int, 0)

    # Force dump of LLVM IR
    DUMP_LLVM = _readenv("NUMBA_DUMP_LLVM", int, DEBUG)

    # Force dump of Function optimized LLVM IR
    DUMP_FUNC_OPT = _readenv("NUMBA_DUMP_FUNC_OPT", int, DEBUG)

    # Force dump of Optimized LLVM IR
    DUMP_OPTIMIZED = _readenv("NUMBA_DUMP_OPTIMIZED", int, DEBUG)

    # Force disable loop vectorize
    # Loop vectorizer is disabled on 32-bit win32 due to a bug (#649)
    LOOP_VECTORIZE = _readenv("NUMBA_LOOP_VECTORIZE", int, not (IS_WIN32 and IS_32BITS))

    # Force dump of generated assembly
    DUMP_ASSEMBLY = _readenv("NUMBA_DUMP_ASSEMBLY", int, DEBUG)

    # Force dump of type annotation
    ANNOTATE = _readenv("NUMBA_DUMP_ANNOTATION", int, 0)

    # Dump IR in such as way as to aid in "diff"ing.
    DIFF_IR = _readenv("NUMBA_DIFF_IR", int, 0)

    # Dump type annotation in html format
    def fmt_html_path(path):
        if path is None:
            return path
        else:
            return os.path.abspath(path)

    HTML = _readenv("NUMBA_DUMP_HTML", fmt_html_path, None)

    # Allow interpreter fallback so that Numba @jit decorator will never
    # fail. Use for migrating from old numba (<0.12) which supported
    # closure, and other yet-to-be-supported features.
    COMPATIBILITY_MODE = _readenv("NUMBA_COMPATIBILITY_MODE", int, 0)

    # x86-64 specific
    # Enable AVX on supported platforms where it won't degrade performance.
    def avx_default():
        if not _os_supports_avx():
            return False
        else:
            # There are various performance issues with AVX and LLVM
            # on some CPUs (list at
            # http://llvm.org/bugs/buglist.cgi?quicksearch=avx).
            # For now we'd rather disable it, since it can pessimize code
            cpu_name = ll.get_host_cpu_name()
            return cpu_name not in (
                "corei7-avx",
                "core-avx-i",
                "sandybridge",
                "ivybridge",
            )

    ENABLE_AVX = _readenv("NUMBA_ENABLE_AVX", int, avx_default)

    # if set and SVML is available, it will be disabled
    # By default, it's disabled on 32-bit platforms.
    DISABLE_INTEL_SVML = _readenv("NUMBA_DISABLE_INTEL_SVML", int, IS_32BITS)

    # Disable jit for debugging
    DISABLE_JIT = _readenv("NUMBA_DISABLE_JIT", int, 0)

    # choose parallel backend to use
    THREADING_LAYER = _readenv("NUMBA_THREADING_LAYER", str, "default")

    # CUDA Configs

    # Force CUDA compute capability to a specific version
    FORCE_CUDA_CC = _readenv("NUMBA_FORCE_CUDA_CC", _parse_cc, None)

    # Disable CUDA support
    DISABLE_CUDA = _readenv("NUMBA_DISABLE_CUDA", int, int(MACHINE_BITS == 32))

    # Enable CUDA simulator
    ENABLE_CUDASIM = _readenv("NUMBA_ENABLE_CUDASIM", int, 0)

    # CUDA logging level
    # Any level name from the *logging* module.  Case insensitive.
    # Defaults to CRITICAL if not set or invalid.
    # Note: This setting only applies when logging is not configured.
    #       Any existing logging configuration is preserved.
    CUDA_LOG_LEVEL = _readenv("NUMBA_CUDA_LOG_LEVEL", str, "")

    # Maximum number of pending CUDA deallocations (default: 10)
    CUDA_DEALLOCS_COUNT = _readenv("NUMBA_CUDA_MAX_PENDING_DEALLOCS_COUNT", int, 10)

    # Maximum ratio of pending CUDA deallocations to capacity (default: 0.2)
    CUDA_DEALLOCS_RATIO = _readenv("NUMBA_CUDA_MAX_PENDING_DEALLOCS_RATIO", float, 0.2)

    # HSA Configs

    # Disable HSA support
    DISABLE_HSA = _readenv("NUMBA_DISABLE_HSA", int, 0)

    # The default number of threads to use.
    NUMBA_DEFAULT_NUM_THREADS = max(1, multiprocessing.cpu_count())

    # Numba thread pool size (defaults to number of CPUs on the system).
    NUMBA_NUM_THREADS = _readenv("NUMBA_NUM_THREADS", int, NUMBA_DEFAULT_NUM_THREADS)

    # Profiling support

    # Indicates if a profiler detected. Only VTune can be detected for now
    RUNNING_UNDER_PROFILER = "VS_PROFILER" in os.environ

    # Enables jit events in LLVM to support profiling of dynamic code
    ENABLE_PROFILING = _readenv(
        "NUMBA_ENABLE_PROFILING", int, int(RUNNING_UNDER_PROFILER)
    )

    # Debug Info

    # The default value for the `debug` flag
    DEBUGINFO_DEFAULT = _readenv("NUMBA_DEBUGINFO", int, ENABLE_PROFILING)
    CUDA_DEBUGINFO_DEFAULT = _readenv("NUMBA_CUDA_DEBUGINFO", int, 0)

    # gdb binary location
    GDB_BINARY = _readenv("NUMBA_GDB_BINARY", str, "/usr/bin/gdb")

    # Inject the configuration values into the module globals
    for name, value in locals().copy().items():
        if name.isupper():
            globals()[name] = value


# Traceback (IndexError)
Traceback (most recent call last):
File "/home/ibutygin/miniconda3/envs/NUMBA_CUSTOM/lib/python3.7/site-packages/llvmlite/ir/instructions.py", line 619, in __init__
typ = typ.elements[i]
IndexError: tuple index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/ibutygin/src/numba/numba/numba/errors.py", line 717, in new_error_context
yield
File "/home/ibutygin/src/numba/numba/numba/lowering.py", line 260, in lower_block
self.lower_inst(inst)
File "/home/ibutygin/src/numba/numba/numba/lowering.py", line 303, in lower_inst
val = self.lower_assign(ty, inst)
File "/home/ibutygin/src/numba/numba/numba/lowering.py", line 467, in lower_assign
return self.lower_expr(ty, value)
File "/home/ibutygin/src/numba/numba/numba/lowering.py", line 932, in lower_expr
res = self.lower_call(resty, expr)
File "/home/ibutygin/src/numba/numba/numba/lowering.py", line 724, in lower_call
res = self._lower_call_normal(fnty, expr, signature)
File "/home/ibutygin/src/numba/numba/numba/lowering.py", line 903, in _lower_call_normal
res = impl(self.builder, argvals, self.loc)
File "/home/ibutygin/src/numba/numba/numba/targets/base.py", line 1132, in __call__
res = self._imp(self._context, builder, self._sig, args, loc=loc)
File "/home/ibutygin/src/numba/numba/numba/targets/base.py", line 1157, in wrapper
return fn(*args, **kwargs)
File "/home/ibutygin/src/numba/numba/numba/typing/templates.py", line 778, in method_impl
return call(builder, args)
File "/home/ibutygin/src/numba/numba/numba/targets/base.py", line 1132, in __call__
res = self._imp(self._context, builder, self._sig, args, loc=loc)
File "/home/ibutygin/src/numba/numba/numba/targets/base.py", line 1157, in wrapper
return fn(*args, **kwargs)
File "/home/ibutygin/src/numba/numba/numba/targets/imputils.py", line 193, in imp
builder, func, fndesc.restype, fndesc.argtypes, args)
File "/home/ibutygin/src/numba/numba/numba/targets/callconv.py", line 477, in call_function
args = list(arginfo.as_arguments(builder, args))
File "/home/ibutygin/src/numba/numba/numba/datamodel/packer.py", line 100, in as_arguments
for dm, val in zip(self._dm_args, values)
File "/home/ibutygin/src/numba/numba/numba/datamodel/packer.py", line 100, in <listcomp>
for dm, val in zip(self._dm_args, values)
File "/home/ibutygin/src/numba/numba/numba/datamodel/models.py", line 447, in as_argument
v = builder.extract_value(value, [i])
File "/home/ibutygin/miniconda3/envs/NUMBA_CUSTOM/lib/python3.7/site-packages/llvmlite/ir/builder.py", line 927, in extract_value
instr = instructions.ExtractValue(self.block, agg, idx, name=name)
File "/home/ibutygin/miniconda3/envs/NUMBA_CUSTOM/lib/python3.7/site-packages/llvmlite/ir/instructions.py", line 622, in __init__
% (list(indices), agg.type))
TypeError: Can't index at [0] in {}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "test.py", line 73, in <module>
print(bar(Dummy()))
File "/home/ibutygin/src/numba/numba/numba/dispatcher.py", line 420, in _compile_for_args
raise e
File "/home/ibutygin/src/numba/numba/numba/dispatcher.py", line 353, in _compile_for_args
return self.compile(tuple(argtypes))
File "/home/ibutygin/src/numba/numba/numba/compiler_lock.py", line 32, in _acquire_compile_lock
return func(*args, **kwargs)
File "/home/ibutygin/src/numba/numba/numba/dispatcher.py", line 768, in compile
cres = self._compiler.compile(args, return_type)
File "/home/ibutygin/src/numba/numba/numba/dispatcher.py", line 77, in compile
status, retval = self._compile_cached(args, return_type)
File "/home/ibutygin/src/numba/numba/numba/dispatcher.py", line 91, in _compile_cached
retval = self._compile_core(args, return_type)
File "/home/ibutygin/src/numba/numba/numba/dispatcher.py", line 109, in _compile_core
pipeline_class=self.pipeline_class)
File "/home/ibutygin/src/numba/numba/numba/compiler.py", line 543, in compile_extra
return pipeline.compile_extra(func)
File "/home/ibutygin/src/numba/numba/numba/compiler.py", line 328, in compile_extra
return self._compile_bytecode()
File "/home/ibutygin/src/numba/numba/numba/compiler.py", line 389, in _compile_bytecode
return self._compile_core()
File "/home/ibutygin/src/numba/numba/numba/compiler.py", line 368, in _compile_core
raise e
File "/home/ibutygin/src/numba/numba/numba/compiler.py", line 359, in _compile_core
pm.run(self.state)
File "/home/ibutygin/src/numba/numba/numba/compiler_machinery.py", line 331, in run
raise patched_exception
File "/home/ibutygin/src/numba/numba/numba/compiler_machinery.py", line 322, in run
self._runPass(idx, pass_inst, state)
File "/home/ibutygin/src/numba/numba/numba/compiler_lock.py", line 32, in _acquire_compile_lock
return func(*args, **kwargs)
File "/home/ibutygin/src/numba/numba/numba/compiler_machinery.py", line 281, in _runPass
mutated |= check(pss.run_pass, internal_state)
File "/home/ibutygin/src/numba/numba/numba/compiler_machinery.py", line 268, in check
mangled = func(compiler_state)
File "/home/ibutygin/src/numba/numba/numba/typed_passes.py", line 391, in run_pass
NativeLowering().run_pass(state)
File "/home/ibutygin/src/numba/numba/numba/typed_passes.py", line 333, in run_pass
lower.lower()
File "/home/ibutygin/src/numba/numba/numba/lowering.py", line 179, in lower
self.lower_normal_function(self.fndesc)
File "/home/ibutygin/src/numba/numba/numba/lowering.py", line 220, in lower_normal_function
entry_block_tail = self.lower_function_body()
File "/home/ibutygin/src/numba/numba/numba/lowering.py", line 245, in lower_function_body
self.lower_block(block)
File "/home/ibutygin/src/numba/numba/numba/lowering.py", line 260, in lower_block
self.lower_inst(inst)
File "/home/ibutygin/miniconda3/envs/NUMBA_CUSTOM/lib/python3.7/contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "/home/ibutygin/src/numba/numba/numba/errors.py", line 725, in new_error_context
six.reraise(type(newerr), newerr, tb)
File "/home/ibutygin/src/numba/numba/numba/six.py", line 669, in reraise
raise value
numba.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
Can't index at [0] in {}

File "test.py", line 71:
def bar(obj):
return obj.inline_method(123,456)
^

[1] During: lowering "$10call_method.4 = call $4load_method.1($const6.2, $const8.3, func=$4load_method.1, args=[Var($const6.2, test.py:71), Var($const8.3, test.py:71)], kws=(), vararg=None)" at test.py (71)

# Fixed code
def process_environ(self, environ):
    def _readenv(name, ctor, default):
        value = environ.get(name)
        if value is None:
            return default() if callable(default) else default
        try:
            return ctor(value)
        except Exception:
            warnings.warn(
                "environ %s defined but failed to parse '%s'" % (name, value),
                RuntimeWarning,
            )
            return default

    def optional_str(x):
        return str(x) if x is not None else None

    # developer mode produces full tracebacks, disables help instructions
    DEVELOPER_MODE = _readenv("NUMBA_DEVELOPER_MODE", int, 0)

    # disable performance warnings, will switch of the generation of
    # warnings of the class NumbaPerformanceWarning
    DISABLE_PERFORMANCE_WARNINGS = _readenv(
        "NUMBA_DISABLE_PERFORMANCE_WARNINGS", int, 0
    )

    # Flag to enable full exception reporting
    FULL_TRACEBACKS = _readenv("NUMBA_FULL_TRACEBACKS", int, DEVELOPER_MODE)

    # Show help text when an error occurs
    SHOW_HELP = _readenv("NUMBA_SHOW_HELP", int, not DEVELOPER_MODE)

    # The color scheme to use for error messages, default is no color
    # just bold fonts in use.
    COLOR_SCHEME = _readenv("NUMBA_COLOR_SCHEME", str, "no_color")

    # Whether to globally enable bounds checking. The default None means
    # to use the value of the flag to @njit. 0 or 1 overrides the flag
    # globally.
    BOUNDSCHECK = _readenv("NUMBA_BOUNDSCHECK", int, None)

    # Debug flag to control compiler debug print
    DEBUG = _readenv("NUMBA_DEBUG", int, 0)

    # DEBUG print IR after pass names
    DEBUG_PRINT_AFTER = _readenv("NUMBA_DEBUG_PRINT_AFTER", str, "none")

    # DEBUG print IR before pass names
    DEBUG_PRINT_BEFORE = _readenv("NUMBA_DEBUG_PRINT_BEFORE", str, "none")

    # DEBUG print IR before and after pass names
    DEBUG_PRINT_WRAP = _readenv("NUMBA_DEBUG_PRINT_WRAP", str, "none")

    # Highlighting in intermediate dumps
    HIGHLIGHT_DUMPS = _readenv("NUMBA_HIGHLIGHT_DUMPS", int, 0)

    # JIT Debug flag to trigger IR instruction print
    DEBUG_JIT = _readenv("NUMBA_DEBUG_JIT", int, 0)

    # Enable debugging of front-end operation
    # (up to and including IR generation)
    DEBUG_FRONTEND = _readenv("NUMBA_DEBUG_FRONTEND", int, 0)

    # How many recently deserialized functions to retain regardless
    # of external references
    FUNCTION_CACHE_SIZE = _readenv("NUMBA_FUNCTION_CACHE_SIZE", int, 128)

    # Enable logging of cache operation
    DEBUG_CACHE = _readenv("NUMBA_DEBUG_CACHE", int, DEBUG)

    # Redirect cache directory
    # Contains path to the directory
    CACHE_DIR = _readenv("NUMBA_CACHE_DIR", str, "")

    # Enable tracing support
    TRACE = _readenv("NUMBA_TRACE", int, 0)

    # Enable debugging of type inference
    DEBUG_TYPEINFER = _readenv("NUMBA_DEBUG_TYPEINFER", int, 0)

    # Configure compilation target to use the specified CPU name
    # and CPU feature as the host information.
    # Note: this overrides "host" option for AOT compilation.
    CPU_NAME = _readenv("NUMBA_CPU_NAME", optional_str, None)
    CPU_FEATURES = _readenv(
        "NUMBA_CPU_FEATURES",
        optional_str,
        ("" if str(CPU_NAME).lower() == "generic" else None),
    )
    # Optimization level
    OPT = _readenv("NUMBA_OPT", int, 3)

    # Force dump of Python bytecode
    DUMP_BYTECODE = _readenv("NUMBA_DUMP_BYTECODE", int, DEBUG_FRONTEND)

    # Force dump of control flow graph
    DUMP_CFG = _readenv("NUMBA_DUMP_CFG", int, DEBUG_FRONTEND)

    # Force dump of Numba IR
    DUMP_IR = _readenv("NUMBA_DUMP_IR", int, DEBUG_FRONTEND or DEBUG_TYPEINFER)

    # print debug info of analysis and optimization on array operations
    DEBUG_ARRAY_OPT = _readenv("NUMBA_DEBUG_ARRAY_OPT", int, 0)

    # insert debug stmts to print information at runtime
    DEBUG_ARRAY_OPT_RUNTIME = _readenv("NUMBA_DEBUG_ARRAY_OPT_RUNTIME", int, 0)

    # print stats about parallel for-loops
    DEBUG_ARRAY_OPT_STATS = _readenv("NUMBA_DEBUG_ARRAY_OPT_STATS", int, 0)

    # prints user friendly information about parllel
    PARALLEL_DIAGNOSTICS = _readenv("NUMBA_PARALLEL_DIAGNOSTICS", int, 0)

    # print debug info of inline closure pass
    DEBUG_INLINE_CLOSURE = _readenv("NUMBA_DEBUG_INLINE_CLOSURE", int, 0)

    # Force dump of LLVM IR
    DUMP_LLVM = _readenv("NUMBA_DUMP_LLVM", int, DEBUG)

    # Force dump of Function optimized LLVM IR
    DUMP_FUNC_OPT = _readenv("NUMBA_DUMP_FUNC_OPT", int, DEBUG)

    # Force dump of Optimized LLVM IR
    DUMP_OPTIMIZED = _readenv("NUMBA_DUMP_OPTIMIZED", int, DEBUG)

    # Force disable loop vectorize
    # Loop vectorizer is disabled on 32-bit win32 due to a bug (#649)
    LOOP_VECTORIZE = _readenv("NUMBA_LOOP_VECTORIZE", int, not (IS_WIN32 and IS_32BITS))

    # Force dump of generated assembly
    DUMP_ASSEMBLY = _readenv("NUMBA_DUMP_ASSEMBLY", int, DEBUG)

    # Force dump of type annotation
    ANNOTATE = _readenv("NUMBA_DUMP_ANNOTATION", int, 0)

    # Dump IR in such as way as to aid in "diff"ing.
    DIFF_IR = _readenv("NUMBA_DIFF_IR", int, 0)

    # Dump type annotation in html format
    def fmt_html_path(path):
        if path is None:
            return path
        else:
            return os.path.abspath(path)

    HTML = _readenv("NUMBA_DUMP_HTML", fmt_html_path, None)

    # Allow interpreter fallback so that Numba @jit decorator will never
    # fail. Use for migrating from old numba (<0.12) which supported
    # closure, and other yet-to-be-supported features.
    COMPATIBILITY_MODE = _readenv("NUMBA_COMPATIBILITY_MODE", int, 0)

    # x86-64 specific
    # Enable AVX on supported platforms where it won't degrade performance.
    def avx_default():
        if not _os_supports_avx():
            return False
        else:
            # There are various performance issues with AVX and LLVM
            # on some CPUs (list at
            # http://llvm.org/bugs/buglist.cgi?quicksearch=avx).
            # For now we'd rather disable it, since it can pessimize code
            cpu_name = ll.get_host_cpu_name()
            return cpu_name not in (
                "corei7-avx",
                "core-avx-i",
                "sandybridge",
                "ivybridge",
            )

    ENABLE_AVX = _readenv("NUMBA_ENABLE_AVX", int, avx_default)

    # if set and SVML is available, it will be disabled
    # By default, it's disabled on 32-bit platforms.
    DISABLE_INTEL_SVML = _readenv("NUMBA_DISABLE_INTEL_SVML", int, IS_32BITS)

    # Disable jit for debugging
    DISABLE_JIT = _readenv("NUMBA_DISABLE_JIT", int, 0)

    # choose parallel backend to use
    THREADING_LAYER = _readenv("NUMBA_THREADING_LAYER", str, "default")

    # CUDA Configs

    # Force CUDA compute capability to a specific version
    FORCE_CUDA_CC = _readenv("NUMBA_FORCE_CUDA_CC", _parse_cc, None)

    # Disable CUDA support
    DISABLE_CUDA = _readenv("NUMBA_DISABLE_CUDA", int, int(MACHINE_BITS == 32))

    # Enable CUDA simulator
    ENABLE_CUDASIM = _readenv("NUMBA_ENABLE_CUDASIM", int, 0)

    # CUDA logging level
    # Any level name from the *logging* module.  Case insensitive.
    # Defaults to CRITICAL if not set or invalid.
    # Note: This setting only applies when logging is not configured.
    #       Any existing logging configuration is preserved.
    CUDA_LOG_LEVEL = _readenv("NUMBA_CUDA_LOG_LEVEL", str, "")

    # Maximum number of pending CUDA deallocations (default: 10)
    CUDA_DEALLOCS_COUNT = _readenv("NUMBA_CUDA_MAX_PENDING_DEALLOCS_COUNT", int, 10)

    # Maximum ratio of pending CUDA deallocations to capacity (default: 0.2)
    CUDA_DEALLOCS_RATIO = _readenv("NUMBA_CUDA_MAX_PENDING_DEALLOCS_RATIO", float, 0.2)

    # HSA Configs

    # Disable HSA support
    DISABLE_HSA = _readenv("NUMBA_DISABLE_HSA", int, 0)

    # The default number of threads to use.
    NUMBA_DEFAULT_NUM_THREADS = max(1, multiprocessing.cpu_count())

    # Numba thread pool size (defaults to number of CPUs on the system).
    NUMBA_NUM_THREADS = _readenv("NUMBA_NUM_THREADS", int, NUMBA_DEFAULT_NUM_THREADS)

    # Profiling support

    # Indicates if a profiler detected. Only VTune can be detected for now
    RUNNING_UNDER_PROFILER = "VS_PROFILER" in os.environ

    # Enables jit events in LLVM to support profiling of dynamic code
    ENABLE_PROFILING = _readenv(
        "NUMBA_ENABLE_PROFILING", int, int(RUNNING_UNDER_PROFILER)
    )

    # Debug Info

    # The default value for the `debug` flag
    DEBUGINFO_DEFAULT = _readenv("NUMBA_DEBUGINFO", int, ENABLE_PROFILING)
    CUDA_DEBUGINFO_DEFAULT = _readenv("NUMBA_CUDA_DEBUGINFO", int, 0)

    # gdb binary location
    GDB_BINARY = _readenv("NUMBA_GDB_BINARY", str, "/usr/bin/gdb")

    # Inject the configuration values into the module globals
    for name, value in locals().copy().items():
        if name.isupper():
            globals()[name] = value