code: def debug_mode(
      log_filename="log.txt",
      log_level="INFO",
      native_debug=True,
      simd=True,
  ):
      """Sets package into debug mode.
  
      Args:
          log_filename: A string that is the filepath to log to, or sys.stderr/sys.stdout.
          log_level: Logging level. For example, "DEBUG".
          native_debug: Load debug versions of native libraries if True.
          simd: Turns on or off the use of SIMD on systems that support it.
  
      Returns:
          Logging handler.
      """
      import json
      import logging
      from .utils._native import Native
  
      # Exit fast on second call.
      if _current_module.is_debug_mode:
          raise Exception(
              "Cannot call debug_mode more than once in the same session."
          )
      else:
          _current_module.is_debug_mode = True
  
      # Register log
      handler = register_log(log_filename, log_level)
  
      # Write basic system diagnostic
      debug_dict = debug_info()
      debug_str = json.dumps(debug_dict, indent=2)
      root = logging.getLogger("interpret")
      root.info(debug_str)
  
      # Load native libraries in debug mode if needed
      native = Native.get_native_singleton(
          is_debug=native_debug, simd=simd
      )
      native.set_logging(log_level)
  
      return handler
  
file_path: interpret/python/interpret-core/interpret/develop.py
imports: import sys
label_desc: Use image node_id 6 for calling a global function with example usage: debug_mode(log_filename, log_level, native_debug, simd) and returns: handler