code: def _initialize_if_necessary():
      global _current_mode, _default_handler
  
      with _init_lock:
          if _default_handler is not None:
              return
  
          formatter = CustomFormatter(
              fmt="{asctime}.{msecs:03.0f} [{bold}{levelcolor}{levelname}{reset}]{caller_block} {message}",
              style="{",
              datefmt="%b %d %H:%M:%S",
          )
          _default_handler = logging.StreamHandler()
          _default_handler.setFormatter(formatter)
  
          _enable_default_handler("hivemind")
  
imports: import logging
  import os
  import sys
  import threading
  from enum import Enum
  from typing import Any, Optional, Union
label_desc: Use image node_id 2 for calling a global function with example usage: _initialize_if_necessary() without return types