code: def app_get_relative_path(requests_pathname, path):
      if requests_pathname == "/" and path == "":
          return "/"
      if requests_pathname != "/" and path == "":
          return requests_pathname
      if not path.startswith("/"):
          raise exceptions.UnsupportedRelativePath(
              f"""
              Paths that aren't prefixed with a leading / are not supported.
              You supplied: {path}
              """
          )
      return "/".join([requests_pathname.rstrip("/"), path.lstrip("/")])
  
file_path: dash/dash/_get_paths.py
imports: from ._utils import AttributeDict
  from .None import exceptions
label_desc: Use image node_id 4 for calling a global function with example usage: app_get_relative_path(requests_pathname, path) and returns: str, str, requests_pathname