code: def build_stream_handler(
      level: int = DEFAULT_LOG_LEVEL,
  ) -> logging.StreamHandler:
      """Build the default stream handler used for most Ax logging. Sets
      default level to INFO, instead of WARNING.
  
      Args:
          level: The log level. By default, sets level to INFO
  
      Returns:
          A logging.StreamHandler instance
      """
      console = logging.StreamHandler()
      console.setLevel(level=level)
      formatter = _build_stream_formatter()
      console.setFormatter(formatter)
      return console
  
imports: import logging
  import os
  import re
  from functools import wraps
  from typing import Any, Callable, Iterable, List, TypeVar
  from ax.utils.common.decorator import ClassDecorator
label_desc: Use image node_id 2 for calling a global function with example usage: build_stream_handler(level) and returns: console