code: def get_app_url_for_handle(handle: str, *, base_url=None):
      if base_url is None:
          import os
  
          if "labml_app_url" in os.environ:
              base_url = os.environ["labml_app_url"]
  
      if base_url is None:
          return None
  
      base_url = base_url.strip()
      if not base_url:
          return None
  
      if not base_url.startswith("http"):
          raise RuntimeError(
              f"app_url should be a valid URL: {base_url}"
          )
      if "?" in base_url:
          raise RuntimeError(
              f"app_url should be a valid URL "
              f"that does contain any url parameters or '?': {base_url}"
          )
  
      if not base_url.endswith("/"):
          base_url += "/"
  
      if not handle:
          return f"{base_url}"
      else:
          return f"{base_url}{handle}?"
  
imports: from copy import deepcopy
  from pathlib import Path
  from typing import Optional, Dict
  from labml.logger import Text
  from labml.utils import get_caller_file
  from labml.utils.notice import labml_notice
  from .None import util
  from .app.configs import AppTrackConfigs
  from .util import is_colab, is_kaggle
label_desc: Use image node_id 1 for calling a global function with example usage: get_app_url_for_handle(handle) and returns: None, None, base_url, base_url, handle, str