code: def bool_arg(
      request: Request, name: Text, default: bool = True
  ) -> bool:
      """Returns a passed boolean argument of the request or a default.
  
      Checks the `name` parameter of the request if it contains a valid
      boolean value. If not, `default` is returned.
  
      Args:
          request: Sanic request.
          name: Name of argument.
          default: Default value for `name` argument.
  
      Returns:
          A bool value if `name` is a valid boolean, `default` otherwise.
      """
      return str(request.args.get(name, default)).lower() == "true"
  
imports: import ssl
  from functools import cached_property
  import aiohttp
  import logging
  import os
  from aiohttp.client_exceptions import ContentTypeError
  from sanic.request import Request
  from typing import Any, Optional, Text, Dict
  from rasa.shared.exceptions import FileNotFoundException
  import rasa.shared.utils.io
  import rasa.utils.io
  from rasa.core.constants import DEFAULT_REQUEST_TIMEOUT
label_desc: Use image node_id 3 for calling a global function with example usage: bool_arg(request, name, default) and returns: unknown