code: def create_static_handler(
      prefix: str, key: str, app: Application
  ) -> tuple[
      str, type[StaticFileHandler | StaticHandler], dict[str, Any]
  ]:
      route = prefix
      route += "/static/(.*)" if key == "/" else key + "/static/(.*)"
      if app.static_path is not None:
          return (route, StaticFileHandler, {"path": app.static_path})
      return (route, StaticHandler, {})
  
imports: from __future__ import annotations
  import logging
  import gc
  import os
  from pprint import pformat
  from types import ModuleType
  from typing import TYPE_CHECKING, Any, Mapping, Sequence
  from urllib.parse import urljoin
  from tornado.ioloop import PeriodicCallback
  from tornado.web import Application, StaticFileHandler
  from ..application import Application
  from ..document import Document
  from ..model import Model
  from ..resources import Resources
  from ..settings import settings
  from ..util.dependencies import import_optional
  from ..util.strings import format_docstring
  from ..util.tornado import fixup_windows_event_loop_policy
  from .auth_provider import NullAuth
  from .connection import ServerConnection
  from .contexts import ApplicationContext
  from .session import ServerSession
  from .urls import per_app_patterns, toplevel_patterns
  from .views.ico_handler import IcoHandler
  from .views.root_handler import RootHandler
  from .views.static_handler import StaticHandler
  from .views.ws import WSHandler
label_desc: Use image node_id 1 for calling a global function with example usage: create_static_handler(prefix, key, app) and returns: route,  StaticHandler,  dict, route,  StaticFileHandler,  dict