code: def update_sanic_log_level(
      log_file: Optional[Text] = None,
      use_syslog: Optional[bool] = False,
      syslog_address: Optional[Text] = None,
      syslog_port: Optional[int] = None,
      syslog_protocol: Optional[Text] = None,
  ) -> None:
      """Set the log level to 'LOG_LEVEL_LIBRARIES' environment variable ."""
      from sanic.log import logger, error_logger, access_logger
  
      log_level = os.environ.get(
          ENV_LOG_LEVEL_LIBRARIES, DEFAULT_LOG_LEVEL_LIBRARIES
      )
  
      logger.setLevel(log_level)
      error_logger.setLevel(log_level)
      access_logger.setLevel(log_level)
  
      logger.propagate = False
      error_logger.propagate = False
      access_logger.propagate = False
  
      if log_file is not None:
          formatter = logging.Formatter(
              "%(asctime)s [%(levelname)-5.5s]  %(message)s"
          )
          file_handler = logging.FileHandler(log_file)
          file_handler.setFormatter(formatter)
  
          logger.addHandler(file_handler)
          error_logger.addHandler(file_handler)
          access_logger.addHandler(file_handler)
      if use_syslog:
          formatter = logging.Formatter(
              "%(asctime)s [%(levelname)-5.5s] [%(process)d]"
              " %(message)s"
          )
          socktype = (
              SOCK_STREAM
              if syslog_protocol == TCP_PROTOCOL
              else SOCK_DGRAM
          )
          syslog_handler = logging.handlers.SysLogHandler(
              address=(syslog_address, syslog_port), socktype=socktype
          )
          syslog_handler.setFormatter(formatter)
          logger.addHandler(syslog_handler)
          error_logger.addHandler(syslog_handler)
          access_logger.addHandler(syslog_handler)
  
imports: import copy
  import inspect
  import logging
  import logging.config
  import logging.handlers
  import os
  import shutil
  import tempfile
  import warnings
  from pathlib import Path
  from types import TracebackType
  from typing import Any, Coroutine, Dict, List, Optional, Text, Type, TypeVar, Union, ContextManager, Set, Tuple
  from socket import SOCK_DGRAM, SOCK_STREAM
  import numpy
  import rasa.utils.io
  from rasa.constants import DEFAULT_LOG_LEVEL_LIBRARIES, ENV_LOG_LEVEL_LIBRARIES, ENV_LOG_LEVEL_MATPLOTLIB, ENV_LOG_LEVEL_RABBITMQ, ENV_LOG_LEVEL_KAFKA
  from rasa.shared.constants import DEFAULT_LOG_LEVEL, ENV_LOG_LEVEL, TCP_PROTOCOL
  from rasa.shared.exceptions import RasaException
  import rasa.shared.utils.io
label_desc: Use image node_id 11 for calling a global function with example usage: update_sanic_log_level(log_file, use_syslog, syslog_address, syslog_port, syslog_protocol) without return types