code: def _shortcut_to_config(shortcut: str) -> Dict[str, Any]:
      p: urllib.parse.ParseResult = urllib.parse.urlparse(shortcut)
      if any((p.params, p.query, p.fragment)):
          raise ValueError(
              f'Malformed checkpoint_storage string "{shortcut}"'
          )
  
      scheme = p.scheme.lower()
  
      if scheme in ["", "file"]:
          return {
              "type": "shared_fs",
              "host_path": p.path,
          }
      elif scheme in ["s3", "gs"]:
          bucket = p.netloc
          prefix = p.path.lstrip("/")
          storage_type = {
              "s3": "s3",
              "gs": "gcs",
          }[scheme]
  
          return {
              "type": storage_type,
              "bucket": bucket,
              "prefix": prefix,
          }
      else:
          raise NotImplementedError(
              "tensorboard only supports shared_fs, s3, and gs "
              "shortcuts at the moment"
          )
  
file_path: determined/harness/determined/tensorboard/build.py
imports: import os
  import pathlib
  import urllib
  from typing import Any, Dict, Optional, Union
  from determined.common.storage.shared import _full_storage_path
  from determined.tensorboard import azure, base, directory, gcs, s3, shared
label_desc: Use image node_id 5 for calling a global function with example usage: _shortcut_to_config(shortcut) and returns: dict, dict