code: def set_level(level):
      
      handler, logger = find_handler(logging.getLogger(), match_stream_handler)
      if handler and logger:
          # Change the level of the existing handler.
          handler.setLevel(level_to_number(level))
          # Adjust the level of the selected logger.
          adjust_level(logger, level)
      else:
          # Create a new handler with the given level.
          install(level=level)
docs: Set the logging level of the root handler.
  
      :param level: The logging level to filter on (an integer or string).
  
      If no root handler exists yet this automatically calls :func:`install()`.