code: def use_hivemind_log_handler(where: Union[HandlerMode, str]) -> None:
      """
      Choose loggers where the default hivemind log handler is applied. Options for the ``where`` argument are:
  
      * "in_hivemind" (default): Use the hivemind log handler in the loggers of the ``hivemind`` package.
                                 Don't propagate their messages to the root logger.
      * "nowhere": Don't use the hivemind log handler anywhere.
                   Propagate the ``hivemind`` messages to the root logger.
      * "in_root_logger": Use the hivemind log handler in the root logger
                          (that is, in all application loggers until they disable propagation to the root logger).
                          Propagate the ``hivemind`` messages to the root logger.
  
      The options may be defined as strings (case-insensitive) or values from the HandlerMode enum.
      """
  
      global _current_mode
  
      if isinstance(where, str):
          # We allow `where` to be a string, so a developer does not have to import the enum for one usage
          where = HandlerMode[where.upper()]
  
      _initialize_if_necessary()
  
      if where == _current_mode:
          return
  
      if _current_mode == HandlerMode.IN_HIVEMIND:
          _disable_default_handler("hivemind")
      elif _current_mode == HandlerMode.IN_ROOT_LOGGER:
          _disable_default_handler(None)
  
      _current_mode = where
  
      if _current_mode == HandlerMode.IN_HIVEMIND:
          _enable_default_handler("hivemind")
      elif _current_mode == HandlerMode.IN_ROOT_LOGGER:
          _enable_default_handler(None)
  
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 6 for calling a global function with example usage: use_hivemind_log_handler(where) without return types