code: def concat_url(base: Text, subpath: Optional[Text]) -> Text:
      """Append a subpath to a base url.
  
      Strips leading slashes from the subpath if necessary. This behaves
      differently than `urlparse.urljoin` and will not treat the subpath
      as a base url if it starts with `/` but will always append it to the
      `base`.
  
      Args:
          base: Base URL.
          subpath: Optional path to append to the base URL.
  
      Returns:
          Concatenated URL with base and subpath.
      """
      if not subpath:
          if base.endswith("/"):
              logger.debug(
                  f"The URL '{base}' has a trailing slash. Please make sure the "
                  f"target server supports trailing slashes for this endpoint."
              )
          return base
  
      url = base
      if not base.endswith("/"):
          url += "/"
      if subpath.startswith("/"):
          subpath = subpath[1:]
      return url + subpath
  
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 2 for calling a global function with example usage: concat_url(base, subpath) and returns: unknown, base