code: def build_single_handler_applications(
      paths: list[str], argvs: dict[str, list[str]] | None = None
  ) -> dict[str, Application]:
      """Return a dictionary mapping routes to Bokeh applications built using
      single handlers, for specified files or directories.
  
      This function iterates over ``paths`` and ``argvs`` and calls
      :func:`~bokeh.command.util.build_single_handler_application` on each
      to generate the mapping.
  
      Args:
          paths (seq[str]) : paths to files or directories for creating Bokeh
              applications.
  
          argvs (dict[str, list[str]], optional) : mapping of paths to command
              line arguments to pass to the handler for each path
  
      Returns:
          dict[str, Application]
  
      Raises:
          RuntimeError
  
      """
      applications: dict[str, Application] = {}
      argvs = argvs or {}
  
      for path in paths:
          application = build_single_handler_application(
              path, argvs.get(path, [])
          )
  
          route = application.handlers[0].url_path()
  
          if not route:
              if "/" in applications:
                  raise RuntimeError(
                      "Don't know the URL path to use for %s" % (path)
                  )
              route = "/"
          applications[route] = application
  
      return applications
  
file_path: bokeh/src/bokeh/command/util.py
imports: from __future__ import annotations
  import logging
  import contextlib
  import errno
  import os
  import sys
  from typing import TYPE_CHECKING, Iterator
  from bokeh.application import Application
  from bokeh.application.handlers import DirectoryHandler, Handler, NotebookHandler, ScriptHandler
  from bokeh.util.warnings import warn
label_desc: Use image node_id 3 for calling a global function with example usage: build_single_handler_applications(paths, argvs) and returns: applications