code: def _get_stream_reading_timeout(
      request_timeout: Optional[int] = None,
  ) -> ClientTimeout:
      """Define the ClientTimeout with fallbacks.
  
      First use the `request_timeout` function parameter if available, this comes from the
      `--request-timeout` command line argument.
      If that fails fallback `STREAM_READING_TIMEOUT_ENV`, a commandline argument.
      Lastly fallback to `DEFAULT_STREAM_READING_TIMEOUT` from rasa.core.constants
      """
      timeout_str = (
          request_timeout
          if request_timeout is not None
          else os.environ.get(
              STREAM_READING_TIMEOUT_ENV, DEFAULT_STREAM_READING_TIMEOUT
          )
      )
  
      return ClientTimeout(int(timeout_str))
  
imports: import asyncio
  import json
  import logging
  import os
  from typing import Any, AsyncGenerator, Dict, List, Optional, Text, overload
  import aiohttp
  import questionary
  from aiohttp import ClientTimeout
  from prompt_toolkit.styles import Style
  import rasa.shared.utils.cli
  import rasa.shared.utils.io
  from rasa.cli import utils
  from rasa.core import utils
  from rasa.core.channels.rest import RestInput
  from rasa.core.constants import DEFAULT_SERVER_URL, DEFAULT_STREAM_READING_TIMEOUT
  from rasa.shared.constants import INTENT_MESSAGE_PREFIX
  from rasa.shared.utils.io import DEFAULT_ENCODING
label_desc: Use image node_id 3 for calling a global function with example usage: _get_stream_reading_timeout(request_timeout) and returns: ClientTimeout